in reply to Cannot dereference hash in subroutine....

sub GEN_HTML { + # generate HTML for form $mp3hash = shift;
That $mp3hash is a global variable, a strange thing to put a sub parameter in. Did you mean my $mp3hash = shift;?