in reply to Re: Transferring local hashes to module subroutines
in thread Transferring local hashes to module subroutines
I am using strict now as suggested and it tells me there is an odd number of elements in the hash assignment at my (%hash,$scalar) = @_;. What is going on here?sub module_subroutine { my (%hash,$scalar) = @_; return "The color of the ".$scalar." is ".$hash{color}; } my %hash_to_send; my $scalar = "water"; $hash_to_send{color} = "red"; print module_subroutine(%hash_to_send,$scalar);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Transferring local hashes to module subroutines
by EvanK (Chaplain) on Aug 06, 2008 at 14:45 UTC | |
|
Re^3: Transferring local hashes to module subroutines
by ikegami (Patriarch) on Aug 06, 2008 at 19:11 UTC | |
|
Re^3: Transferring local hashes to module subroutines
by dHarry (Abbot) on Aug 06, 2008 at 14:38 UTC |