Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
given and forby GlitchMr (Sexton) |
on Aug 21, 2012 at 08:54 UTC ( [id://988652]=perlquestion: print w/replies, xml ) | Need Help?? |
GlitchMr has asked for the wisdom of the Perl Monks concerning the following question: After you will type at least use 5.010 you can use given statement. It allows you to use when inside it, but for/foreach also allows it. I would like to know why Perl has given when for can be used for this same thing (at least I think so). For background, in this example, both code samples are equivalent.
Back to
Seekers of Perl Wisdom
|
|