Re: Does Perl have "Case" Statements?

2002-02-28 Thread sachin balsekar
Hi, Perl as such doesnt have support case structures u cud try using block which is almost similar to case struct.. A BLOCK by itself (labeled or not) is semantically equivalent to a loop that executes once. Thus you can use any of the loop control statements in it to leave or restart the

Re: Does Perl have "Case" Statements?

2002-02-28 Thread Chris
Jenda Krynicky wrote: > From: Chris <[EMAIL PROTECTED]> > >>I have been looking in the Learning Perl book, and cannot find it. >> >>I am sure that it is just a terminology thing. >> >>In VB {Yeah the old VB again :P) I could do: >> >>Select Case $Junk >> Case 1 >>Do Something >> C

Re: Does Perl have "Case" Statements?

2002-02-28 Thread Brett W. McCoy
> On Thu, 28 Feb 2002, Chris wrote: > > > I have been looking in the Learning Perl book, and cannot find it. > > There isn't a syntactical element in Perl to do case statements (aka > switch in C/C++ & Java). However, they can be done in a variety of ways: I forgot to add that there is also a FA

Re: Does Perl have "Case" Statements?

2002-02-28 Thread Jenda Krynicky
From: Chris <[EMAIL PROTECTED]> > I have been looking in the Learning Perl book, and cannot find it. > > I am sure that it is just a terminology thing. > > In VB {Yeah the old VB again :P) I could do: > > Select Case $Junk > Case 1 > Do Something > Case 2 > Do Somethi

Re: Does Perl have "Case" Statements?

2002-02-28 Thread John W. Krahn
Chris wrote: > > I have been looking in the Learning Perl book, and cannot find it. > I am sure that it is just a terminology thing. > In VB {Yeah the old VB again :P) I could do: > > Select Case $Junk > Case 1 > Do Something > Case 2 > Do Something > Case 3 >

Re: Does Perl have "Case" Statements?

2002-02-28 Thread Brett W. McCoy
On Thu, 28 Feb 2002, Chris wrote: > I have been looking in the Learning Perl book, and cannot find it. There isn't a syntactical element in Perl to do case statements (aka switch in C/C++ & Java). However, they can be done in a variety of ways: use the Switch.pm module or use the aliasing for

Re: Does Perl have "Case" Statements?

2002-02-28 Thread Michael Kelly
On 2/28/02 1:41 PM, Chris <[EMAIL PROTECTED]> wrote: > I have been looking in the Learning Perl book, and cannot find it. > > I am sure that it is just a terminology thing. > > In VB {Yeah the old VB again :P) I could do: > > Select Case $Junk > Case 1 > Do Something > Case 2 > Do Something >

Does Perl have "Case" Statements?

2002-02-28 Thread Chris
I have been looking in the Learning Perl book, and cannot find it. I am sure that it is just a terminology thing. In VB {Yeah the old VB again :P) I could do: Select Case $Junk Case 1 Do Something Case 2 Do Something Case 3 Do Something Case 4