IISGUY has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl $num1=$ARGV[0]; $num2=$ARGV[1]; if ( @ARGV < 2 ) { print "Number of arguments must be two \n" } elsif ( @ARGV > 2 ) { print "Number of arguments cannot be more than 2 \n" } else { ($num=$num1++); print $num; print "\n"; } unless ($num1=$num2) { print $num2; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Syntax trouble?
by LanX (Saint) on May 28, 2011 at 19:01 UTC | |
|
Re: Syntax trouble?
by davies (Monsignor) on May 28, 2011 at 19:09 UTC | |
|
Re: Syntax trouble?
by luis.roca (Deacon) on May 28, 2011 at 19:59 UTC |