You can do something like this:
my $flip = something;
SWITCH: {
( $flip =~ /^0$/ || $flip =~ /^1$/ || $flip =~ /^2$/ ) do {
$local_pref = FL; last SWITCH; };
( $flip =~ /^3$/ || $flip =~ /^4$/ || $flip =~ /^5$/ ) do {
$local_pref = FU; last SWITCH;
On Jan 6, 2004, at 2:08 PM, [EMAIL PROTECTED] wrote:
Yo.
what Up.
I read in Learning Perl that there are no such constructs
like a case statement. Is there something similar or did I misread
this?
As folks have already pointed to both
the classic perlfaq, and implied that
one should
Yo.
I read in Learning Perl that there are no such constructs like a case statement. Is
there
something similar or did I misread this? Also what about functions and
function calls, do these exits or does the subroutines replace these?
thanks
Derek B. Smith
OhioHealth IT
UNIX / TSM /
PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 06, 2004 4:08 PM
To: [EMAIL PROTECTED]
Subject: case and functions
Yo.
I read in Learning Perl that there are no such constructs like a case statement. Is
there
something similar or did I misread this? Also what about functions
Yo.
What's up dog? :)
I read in Learning Perl that there are no such constructs
like a case statement. Is there
Yes, there is.
Do you mean:
if(this) { do this }
elsif(that) { do that }
else { do the other }
something similar or did I misread this? Also
From: [EMAIL PROTECTED]
I read in Learning Perl that there are no such constructs like a case
statement. Is there something similar or did I misread this?
Ask the FAQ, run
perldoc -q case statement
Also
what about functions and function calls, do these exits or does the
[EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
I read in Learning Perl that there are no such constructs like a case
statement. Is there something similar or did I misread this?
Ask the FAQ, run
perldoc -q case statement
Also
what about functions and function calls, do
will read the perldoc.
thanks
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
Jenda Krynicky [EMAIL PROTECTED]
01/06/2004 05:18 PM
To: [EMAIL PROTECTED]
cc:
Subject:Re: case and functions
From: [EMAIL PROTECTED]
I read in Learning Perl
DBSMITH == DBSMITH [EMAIL PROTECTED] writes:
DBSMITH Also, my intention was to avoid the if , then ,elif, then
DBSMITH constructs, mentioned by Dan, for certain situations
What is the source of your fear? Sounds like a phobia to me.
--
Randal L. Schwartz - Stonehenge Consulting Services,
[EMAIL PROTECTED] wrote:
People of the Perl,
thanks for the infoI am familiar with perls subroutines so I will use
these and this name instead of functions. Also, my intention was to avoid
the if , then ,elif, then constructs, mentioned by Dan, for certain
situations which is why I
10 matches
Mail list logo