Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Trying to compare a string...by moritz (Cardinal) |
on Oct 18, 2013 at 08:26 UTC ( [id://1058723]=note: print w/replies, xml ) | Need Help?? |
In addition to choroba's excellent answer, I'd like to point out that you can replace code with data like this:
Factoring the code like this would even allow you to put the genre mapping into a configuration file, and load the hash from it. Finally, Perl 6 has a feature called junctions which does allow you to write code similar to what you tried:
In Section
Seekers of Perl Wisdom
|
|