gitarwmn has asked for the wisdom of the Perl Monks concerning the following question:
I thought I could use ARGV but it doesn't seem to work the way I've written it.
Where the clean() function would be called if the user types clean from the command line when the script runs.if (@ARGV == "clean"){ print "cleaning up dirs"; clean(); }
Does anyone know a better way to do this? Thanks
edit (broquaint): added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using a sub routing as an argument
by Zaxo (Archbishop) on Jun 22, 2004 at 23:19 UTC | |
|
Re: using a sub routing as an argument
by FoxtrotUniform (Prior) on Jun 22, 2004 at 23:30 UTC | |
|
Re: using a sub routing as an argument
by NetWallah (Canon) on Jun 23, 2004 at 04:01 UTC | |
|
Re: using a sub routing as an argument
by Anonymous Monk on Jun 22, 2004 at 23:29 UTC | |
|
Re: using a sub routing as an argument
by data64 (Chaplain) on Jun 23, 2004 at 00:58 UTC | |
|
Re: using a sub routing as an argument
by broquaint (Abbot) on Jun 23, 2004 at 02:36 UTC | |
|
Re: using a sub routing as an argument
by gitarwmn (Beadle) on Jun 23, 2004 at 17:51 UTC |