last question on the switch statement ....



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##



.