XP is just a number | |
PerlMonks |
Here document syntax, what is $0 (was: Newbie need a clue)by nysus (Parson) |
on Mar 29, 2001 at 06:44 UTC ( [id://68029]=perlquestion: print w/replies, xml ) | Need Help?? |
nysus has asked for the wisdom of the Perl Monks concerning the following question:
OK, I bow humble before thee, honorablest Perl monks:
What is this 'EOUsage' in the code below? And what is that funky '$0' variable? I obviously didn't find it too helpful, but here's what the perldoc says about $0: Contains the name of the file containing the Perl script being executed. On some operating systems assigning to ``$0'' modifies the argument area that the ps(1) program sees. This is more useful as a way of indicating the current program state than it is for hiding the program you're running. (Mnemonic: same as sh and ksh.) I'm guessing, from the way it looks, it automatically comments out the lines but how exactly does it work? Here's the subroutine code I have questions on, edited for brevity:
Any other insights into what this subroutine is doing is much appreciated. Thanks! 2001-03-29 Edit by Corion : Changed title
Back to
Seekers of Perl Wisdom
|
|