- or download this
my $count = @ARGV;
print $count;
- or download this
if (@ARGV < 3) {
die "use: script var1 var2 var3\n";
...
my ($var1, $var2, $var3) = @ARGV;
}
## then use $var1, $var2 and $var3 in your program
- or download this
my ($stream, $path, $rturn, $depth, $display) = @ARGV;
$stream = \*STDOUT unless @_ > 0;
...
$rturn = 'all' unless @_ > 2;
$depth = -1 unless @_ > 3;
$display = 'rel_file' unless @_ > 4;
- or download this
my $nextvar = shift @ARGV;
- or download this
for my $this (@ARGV) {
print "$this\n";
}
- or download this
while (<>) {
print "$_\n";
}