hyliau has asked for the wisdom of the Perl Monks concerning the following question:
Initial script as below:
#!/usr/bin/perl # $1 $2 $3 (shell) are in $ARGV[0], $ARGV[1] and $ARGV[2] (perl) $ARGV[2] =~ s/[\r\n]+/ /g; #Now $3/$ARGV[2] doesn't contain any newline/linefeed anymore $shellindex=1; foreach (@ARGV) { print '$',$shellindex,' ($ARGV[',$shellindex-1,']: ',$_,"\n"; ++$shellindex; } print "Hello, World...\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to make perl accept symbol open/close bracket?
by gjb (Vicar) on Jun 27, 2003 at 09:49 UTC | |
by hyliau (Initiate) on Jun 27, 2003 at 10:15 UTC | |
by cfreak (Chaplain) on Jun 27, 2003 at 13:28 UTC | |
by hyliau (Initiate) on Jun 28, 2003 at 03:52 UTC | |
by cfreak (Chaplain) on Jun 30, 2003 at 17:13 UTC |