in reply to why is a "\" needed before a hash in my subroutine call?
The original was modified and without the hash being returned by the sub.#!perl -w use strict; my %hash = ( a => 1, b => 2, c => 3 ); sub change { my $hash = shift; $hash->{c} = 4; } change( \%hash ); for my $key (sort keys %hash) { print "$key : $hash{$key}\n"; } __END__ Output looks like: a : 1 b : 2 c : 4
Hope this helps
"Argument is futile - you will be ignorralated!"
|
|---|