|The stupid question is the question not asked|
Re: STDIN method?by janx (Monk)
|on Oct 17, 2002 at 20:42 UTC ( #206139=note: print w/replies, xml )||Need Help??|
No, sorry. There is no built-in case/switch statement (yet - in Perl 6 there will be, it's called given).
If you don't mind source filters though, there is the excellent module Switch.pm by Damian Conway.
Otherwise you will have to use if/elsif statements.
= assigns, it does not compare!
Use eq for string comparison (or == for a numeric one).
In Section Seekers of Perl Wisdom