while (@ARGV) { $_ = $ARGV[0]; last unless s/^-//; shift; last if /^-$/; while (length) { if (s/^a//) { ++$aflag } elsif (s/^b(.*)//) { $bflag = length($1) ? $1 : shift } else { die "Unknown flag(s): -$_\n" } } }
In reply to Re: Command Line Arguments
by chip
in thread Command Line Arguments
by Adam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |