Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Your Favorite Heroic Perl Story

by holli (Monsignor)
on Jan 22, 2005 at 07:42 UTC ( #424206=note: print w/replies, xml ) Need Help??

in reply to Your Favorite Heroic Perl Story

the set:
I was not long at my new job when i wrote some little tools for my personal ease, when my boss looked over my shoulder.

>> What is this?
<< That is perl. It is a language...
>> I know what is is, we donīt use that, itīs whacky.
>> But,
<< No but. We donīt use it!
>> Ah, ok. .oO(a*****e)Oo.

Two or three weeks later, i looked over the bosses shoulder while he tried to write a filter for a textfile (in VB) with heavy use of index(), substring() and ugly long if/else constructions. It ended up with 70 lines of code and three hours work.
I let him do that and in the meantime i prepared a one-liner in the
perl -n -e "print if //" infile>outfile
style (one line, 2 minutes).

When i showed it to him he was first angry and then amazed. And since that day we use perl a lot and i am the companies "chief of perl".

holli, regexed monk

Replies are listed 'Best First'.
Re^2: Your Favorite Heroic Perl Story
by demerphq (Chancellor) on Jan 22, 2005 at 09:32 UTC

    I got into perl by writing a tool that would parse and extend VB classes with DB interaction (automatically generate a DB schema to make the classes persistent as well as adding persistancy methods to the code). I have never really done any signifigant VB after that project, its all been perl since then pretty much. :-)


Re^2: Your Favorite Heroic Perl Story
by Anonymous Monk on Jan 24, 2005 at 15:56 UTC
    So, all you did was to reinvent grep? Because that's what a perl -ne 'print if //' is.
      Since this seems to be a Windows shop, they might not have grep. Plus, he might have preferred to use Perl for some reason. No need to be so judgmental.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://424206]
[shmem]: erix: what's antisemitic in there? Tell me.
[erix]: AngloZionist
[shmem]: and it is *not* pro-russian. It describes the western world.
[erix]: I'm not going to read it so I could be mistaken but it reeks of useful idiocy
[shmem]: AngloZionist is not an antisemitic term.
[shmem]: erix: be assured that we all are horribly mistaken, always. What would we write tests for, if not for that fact?
[shmem]: and then, audiatur et altera pars.
[erix]: and what's the "Vineyard"? Don't tell me it's doing supernatural stuff too.
[shmem]: go figure. Might help to open views to other ways of perceiving reality. No, no supernatural stuff.
[shmem]: the "Vineyard" is a biblic term, also. But that's not the point.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2018-03-19 20:59 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.