last question on the switch statement ....
- From: dowda@xxxxxxxxxxxxxxxxxx (David Gilden)
- Date: Mon, 18 Apr 2005 01:48:11 -0500
Dear fellow PERL coders...,
What is the "&& do" part of the code doing, i.e. I am looking to understand the syntax,
the example was found in perl beginners archive, from some else's post...
Thanks,
Dave
(kora musician / audiophile / webmaster @ www.coraconnection.com / Ft. Worth, TX, USA)
foreach (@qString)
{
if ($_ =~ m/open/)
{
SWITCH:
{
$_ eq 'Unkopen' && do { next; last SWITCH; };
$_ eq 'QCSSopen' && do { $rep = "Quest Central for SQL Server"; last SWITCH; };
$_ eq 'QCSSDGopen' && do { $rep = "QCSS Data Generator"; last SWITCH; };
$_ eq 'IWopen' && do { $rep = "I/Watch"; last SWITCH; };
##etc##
.
- Follow-Ups:
- Re: last question on the switch statement ....
- From: John W. Krahn
- Re: last question on the switch statement ....
- From: Vladimir D Belousov
- Re: last question on the switch statement ....
- Prev by Date: RE: passing database data to a sub
- Next by Date: Re: passing database data to a sub
- Previous by thread: RSS feed to perl
- Next by thread: Re: last question on the switch statement ....
- Index(es):