Try this: SWITCH: { $s == 1 && do {print "one\n"; last SWITCH;}; $s == 2 && do {print "two\n"; last SWITCH;}; $s == 3 && do {print "three\n"; last SWITCH;}; $s == 4 && do {print "four\n"; last SWITCH;}; $s == 5 && do {print "five\n"; last SWITCH;}; print " No match found.\n"; }
You need a colon, not a semicolon, after SWITCH. The logical and serves very well in place of a string of if statements. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]