in reply to Parsing a hash into a sub

my $thescalar=shift; my %thehash=shift;
shift returns a single element of @_ (i.e. the first element), whereas you (presumably) want all parameters of getInfo except the first to go into %thehash. You can do that like this:
my $thescalar = shift; # 1st parameter goes in $thescalar my %thehash = @_; # everything else goes in %thehash
or even
my ($thescalar, %thehash) = @_;

Replies are listed 'Best First'.
Re^2: Parsing a hash into a sub
by RaginElmo (Novice) on Jul 08, 2006 at 12:18 UTC
    Thanks for the quick reply... I used my %thehash=%{(shift)}; which does the trick as well... Should not have given up the search thanks again for replying