Change
%{$mp3hash{$player}...}
to
%{$mp3hash->{$player}...}
or to
%{$$mp3hash{$player}...}
because you want to use $mp3hash (a reference to a hash), but you're using %mp3hash (which doesn't exist).
use strict would have found this error. use strict would also point out that all your variables are global (which is asking for trouble).
By the way,
print Dumper(\%{$mp3hash});
is the same as
print Dumper($mp3hash);
In reply to Re: Cannot dereference hash in subroutine....
by ikegami
in thread Cannot dereference hash in subroutine....
by bigtiny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |