more useful options | |
PerlMonks |
Re: using hash key as hash value ...by blackjudas (Pilgrim) |
on Oct 02, 2001 at 04:39 UTC ( [id://116034]=note: print w/replies, xml ) | Need Help?? |
The hash %media hasn't been scoped yet, the interpreter executes the 'line' at the semicolon. Therefore %media doesn't exist until perl sees the semicolon. In your case, I would suggest breaking out the assignments into different instructions. Such as the following:
Though there's probably better ways to do it through looping etc, it all depends on what you need done.
In Section
Seekers of Perl Wisdom
|
|