throws me an error, directory or path not found... but actually it does exists...Are you sure?
$ cat 668658.pl use strict; use warnings; use Data::Dumper; sub f { my ($first, $second, $third) = @_; print "first:" . Dumper($first) . "\n"; print "second:" . Dumper($second) . "\n"; print "third:" . Dumper($third) . "\n"; } my @arr = qw ( one two three ); f('@arr'); f(@arr); __END__
$ perl 668658.pl first:$VAR1 = '@arr'; second:$VAR1 = undef; third:$VAR1 = undef; first:$VAR1 = 'one'; second:$VAR1 = 'two'; third:$VAR1 = 'three';
In reply to Re^5: functions and arguments
by andreas1234567
in thread functions and arguments
by mercuryshipz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |