I very rarely need to use hashes, but here I am. I have the following code;
if ($IN->param('midi') ne "NONE") {
$values{'BackgroundMusic'} = $IN->param('midi');
} else { $values{'BackgroundMusic'} = ""; }
However, this gives an error;
Global symbol "%values" requires explicit package name at /home/cgi-bin/ecards/ecard_send.cgi line 36.
Global symbol "%values" requires explicit package name at /home/cgi-bin/ecards/ecard_send.cgi line 37.
Execution of /home/cgi-bin/ecards/ecard_send.cgi aborted due to compilation errors.
What am I doing wrong? As far as I can see, %values is already defined I'm thinking it may have something to do with the difference between %values and $value....but doesn't $value hold a hash?
Any help is appreciated :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
my $values = $IN->get_hash; if ($IN->param('midi') ne "NONE") {
$values{'BackgroundMusic'} = $IN->param('midi');
} else { $values{'BackgroundMusic'} = ""; }
However, this gives an error;
Quote:
Software error: Global symbol "%values" requires explicit package name at /home/cgi-bin/ecards/ecard_send.cgi line 36.
Global symbol "%values" requires explicit package name at /home/cgi-bin/ecards/ecard_send.cgi line 37.
Execution of /home/cgi-bin/ecards/ecard_send.cgi aborted due to compilation errors.
What am I doing wrong? As far as I can see, %values is already defined I'm thinking it may have something to do with the difference between %values and $value....but doesn't $value hold a hash?
Any help is appreciated :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!