slok has asked for the wisdom of the Perl Monks concerning the following question:
why is there a need for a "\" before the hashes when I pass them in as arguments to a subroutine?
sub process($$$) { my($path, $seen, $total) = @_; # do something... } my %seen; my %total; foreach my $path (@ARGV) { process($path, \%seen, \%total); }
Edit: chipmunk 2001-06-03
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: why a
by mpolo (Chaplain) on Jun 03, 2001 at 12:16 UTC | |
|
Re: why a
by larryk (Friar) on Jun 03, 2001 at 15:22 UTC | |
|
Re: why a
by rob_au (Abbot) on Jun 03, 2001 at 12:17 UTC | |
|
Re: why is a "\" needed before a hash in my subroutine call?
by chipmunk (Parson) on Jun 03, 2001 at 19:06 UTC | |
|
(prototypes) Re: why a
by Zaxo (Archbishop) on Jun 03, 2001 at 18:47 UTC | |
by jeffa (Bishop) on Jun 03, 2001 at 20:00 UTC |