"be consistent" | |
PerlMonks |
Re: Given When Syntaxby LanX (Saint) |
on Mar 15, 2014 at 15:54 UTC ( [id://1078454]=note: print w/replies, xml ) | Need Help?? |
I'm mobile and can't spot or test your problem. Normally I recommend replacing given/when with for/if-constructs. But in this particular case I don't understand why you are not simply using an array or a hash, holding the number's names.
Cheers Rolf ( addicted to the Perl Programming Language)
editEhm... did you activate switch? use feature "switch"; or use 5.010;
update
In Section
Seekers of Perl Wisdom
|
|