tradez has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks,
I recently needed to write some code to join a file piped to a perl script. Rather then coding the whole
Tradez
"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)
I remembered there being a special perl way of handling files piped to a script. a $_ type thing ( special character) that fills a data structure with the array for you, saving me precious key strokes. Please inform.my $file = $argv[0]; open (MYFILE, "$argv[0]"); while(<MYFILE){ .....
Tradez
"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)
Edit kudra, 2002-04-15 Changed title
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Lazy Coder
by dws (Chancellor) on Apr 12, 2002 at 20:27 UTC | |
Re: Lazy Coder
by Zaxo (Archbishop) on Apr 12, 2002 at 20:11 UTC | |
by tadman (Prior) on Apr 13, 2002 at 00:10 UTC | |
False lazyness
by Fletch (Bishop) on Apr 12, 2002 at 19:54 UTC | |
by tradez (Pilgrim) on Apr 12, 2002 at 21:42 UTC |
Back to
Seekers of Perl Wisdom