Hello
I'm confused by something that seems it should be simple. How do I pass a $ and a % to a sub?
I was trying
whatever(%list,$val); ... sub whatever { my %list = $_[0]; my $val = $_[1]; ... }
which got me the first value of the hash. I thried @_ which got me the hash, but lost the value... It seems like it kept returning the value from the first call, but it might be just random.
Thanks!
Jimbus
In reply to passing paramters to a sub by jimbus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |