Its just a shame that your example was for the command line and not a script in which the -l switch can't be used

Why can't you use the -l switch in a script? I can think of at least two ways. You can either put the -l on the end of your shebang line or set the $\ directly (which is what -l does if you read the documentation).

Thanks for the advice, but I'm aware of the specifics having programmed in perl for quite some time and written modulated scripts several megabytes in sizes consisting of many thousands of lines of strict, mod_perl compatible code, but I appreciate the sentiment

and it is never wise to brag without backing it up. anyone who has 'created' so much perl code who had to ask how to convert my one liner to work in a script, obviously has not done much real perl. so let's see some of this vaunted 'modulated' code. post some here or a url to some. i would love to do a sweet code review of it. just think, you can edjimicate so many others with the kwality of your code!

but you won't do it. you didn't even show a shorter version of my one liner as you claim you could do. you have done nothing here in this thread to warrant even the slightest assumption of your perl virtuosity. so put up or shut up as they say.

I certainly wasn't bragging, it was merely something I wanted to point out as you seemed to want to boast about your shorter solution, but as by this point several examples had been given to the user I didn't feel the need to turn it into a golf competition.

Quote

anyone who has 'created' so much perl code who had to ask how to convert my one liner to work in a script, obviously has not done much real perl

Well, actually you've misrepresented what actually happened, I never did ask *how* to use your example in a script, It's more convenient for the person asking the question if you provide cut and paste code, rather that a command line example which is more obscure.

Quote

so let's see some of this vaunted 'modulated' code. post some here or a url to some. i would love to do a sweet code review of it. just think, you can edjimicate so many others with the kwality of your code!

This is where we differ - I don't personally feel the need to show everybody my code or prove how great I am by patronising or belittling people. I am quite content with my level of skill - my scripts do their job and sell well, which is all I'm really concerned with.

Quote

you didn't even show a shorter version of my one liner as you claim you could do

Explained above.

Quote

you have done nothing here in this thread to warrant even the slightest assumption of your perl virtuosity.

Precisely, which is why it refelcts badly on you when you try to put me down without even knowing my ability level =)

Quote

i will be waiting to see your code but not holding my breath.

If you are really that desperate I can show you some, but this users thread is not the place for a penis waving competition.

well, you certain defended yourself with nothing. you didn't help the OP. you didn't show better code. you didn't explain -l. you didn't show how to convert a one liner to a script. then what help are you at all? writing 'modulated' code is more than just being lazy with it's. in case you don't get it, the word is modular. hard to imagine you write kwality modules when you use the wrong word. how is your dokumentayshun?

all you have done is complain which can be done by any clueless newbie. and selling scripts and writing good perl code have little to do with each other, just look at redmond or matt's archive. and you do have to prove your perl skills here if you are to complain about how others post here. otherwise your opinions will be ignored and lost in the vast net where even google won't find them.

so let's see even one tiny little itsy bitsy sub of yours. you can paste that here or a url. i have nothing to hide. you can find plenty of my code on cpan or on usenet for all to judge. i have rarely found anyone who codes in isolation and thinks their code is great who actually has a good grasp of code or reality. but you will just smirk and put in stupid smiley's and not do anything to remove the stain you have from this thread. oh well, too bad.

The point that you seem to be missing is that the Perl community is a meritocracy. In order to be respected you need to prove your abilities. Uri has proven his abilities many times in various forums, to the best of my knowledge you have not. You should therefore not be surprised if people listen to Uri more than they listen to you.

The person that started the thread is most likely even more of a novice than me since they could not figure out even a "long and clumsy" solution like my two solutions.

Seeing a one line command line solution is most likely not going to be a practical solution to a person needing this type of question answered, they will look at it and think "how do I use that in my script?" Its impressive if you look at my answers then look at that nice and compact answer, but if its only offered to make my code look bad then why bother posting it? Anyone can make my code look bad, that is not an accomplishment.

I think what I am saying is you guys up there in the Perl clouds might want to consider the ability of the person asking the question to understand the answer and not post stuff if its just to remind the rest of us hacks how uneducated we are. We already feel dumb enough as it is most of the time asking questions we know others will answer in a second when we may have struggled for a few hours to figure it out.

writing 'modulated' code is more than just being lazy with it's. in case you don't get it, the word is modular. hard to imagine you write kwality modules when you use the wrong word. how is your dokumentayshun?

It really seems like you are looking for any possible excuse to make assumptions about my programming abilities. It's quite bizarre. If I use a wrong word then I suppose it *must* mean I'm a useless coder...you win.

Quote

i have rarely found anyone who codes in isolation and thinks their code is great who actually has a good grasp of code or reality. but you will just smirk and put in stupid smiley's and not do anything to remove the stain you have from this thread. oh well, too bad.

More assumptions....I've never labelled my code as great, I've simply felt the need to provide a small amount of defence to your accusations.

I frequently find that the best programmers tend not to patronize or belittle others - they get on with their job, which is where your downfall is...it seems with you its more of an ego trip in which you are intent on proving yourself and your ego can't cope with the idea that there may be others in existance that have perl coding ability also.

I mean, really, what do you want me to show you...something amazing and outstanding?....if so then I can't help....all I can say is that I've written my own collection of perl modules for my needs. I've created a light weight version of CGI.pm without all the bloated html related code, I've created a collection of database modules to interface with MySQL and provide the necessary functionality and flexibility for my scripts...snippet:

My aim in life is not to try and give myself thrills by creating useless (in most cases) one liners, but to making a living by creating useful, flexible and clean code.

I'm sure you'll have comments to make on any code I post as that's the type of person you are - whether I posted something perfect or something utterly rubbish, you'd try to find fault - that comes back to your ego again.

Sigh, I'm losing interest in the discussion and the poor OP must wish we'd all stop ruining his thread.

I must interject here. Your first post in this thread was a reply to uri by saying "It can be made even shorter =)". When I first read it, I thought "umm, okay. why didn't he show us the shorter code?", so I think the initial response you received was justified.

I also think that KevinR has a valid point that occasionally the response to a question doesn't always correlate to the experience level of the person asking. While I can see how uri's reponse to john8320 may be difficult for a new user to understand without more explanation, at least he offered assistance.

I don't see how your post contributed anything to the thread, except to inflame someone who was actually trying to help. Additionally, you stated fallacies which when brought to your attention, you reversed position and contradicted yourself. No matter how good a programmer you may be, please remember to keep an open mind.

I found your use of "wannabe gurus" interesting. The dictionary tells us that, among other definitions, that a "guru" is "a recognized leader in a field". By this definition, both uri and davorg are gurus in the perl community, because [url=http://www.sysarch.com/perl/sort_paper.html]their [url=http://www.manning.com/cross/]accomplishments and interest in helping others are well-known.

All I ask of users of this forum is to be civil to each other and try to help those you can. This includes avoiding conflict, refraining from personal attacks, supporting your statements, and once in a while just biting your tongue so that a useless thread like this can disappear into antiquity.

Seeing a one line command line solution is most likely not going to be a practical solution to a person needing this type of question answered, they will look at it and think "how do I use that in my script?" Its impressive if you look at my answers then look at that nice and compact answer, but if its only offered to make my code look bad then why bother posting it? Anyone can make my code look bad, that is not an accomplishment.

Kevin

I really don't think that Uri posted his solution to make your code look bad. He posted it as a "better" or "more Perlish" solution to the problem.

Personally, I often deliberately don't post a "cut and paste" solution to a problem. After helping out on far too many of these forums for far too long, I've found that all too often if you give someone a cut and paste solution they'll be back with almost exactly the same question a few days later. If you give them an answer that they need to think about then they're more likely to take it in.

Make a man a fire and he'll by warm for a day. Teach a man how to make a fire and he'll be warm forever. Throw a man on a fire and he'll be warm for the rest of his life.

Seeing a one line command line solution is most likely not going to be a practical solution to a person needing this type of question answered, they will look at it and think "how do I use that in my script?" Its impressive if you look at my answers then look at that nice and compact answer, but if its only offered to make my code look bad then why bother posting it? Anyone can make my code look bad, that is not an accomplishment.

Kevin

I really don't think that Uri posted his solution to make your code look bad. He posted it as a "better" or "more Perlish" solution to the problem.

Personally, I often deliberately don't post a "cut and paste" solution to a problem. After helping out on far too many of these forums for far too long, I've found that all too often if you give someone a cut and paste solution they'll be back with almost exactly the same question a few days later. If you give them an answer that they need to think about then they're more likely to take it in.

Make a man a fire and he'll by warm for a day. Teach a man how to make a fire and he'll be warm forever. Throw a man on a fire and he'll be warm for the rest of his life.

Dave,

hehehe.... maybe uri could have used those words (better, more perlish) instead of "long and clumsy".

Anyways, I take no offense from it, I know I am just a novice at this stuff and I appreciate the efforts of people like yourself and uri too that offer suggestions, guidance and the occasional admonition to the unwashed masses.