#for each line while ($line = <EMPLOYEES>) { #remove the carriage return chomp $line; #splits the line between tabs and get the different elements ($name, $city, $language) = split /\t/, $line; next unless $language =~ /$search/; print "$name can speak " . ($search) . " and lives in " . ($city) . " +.\n";
In reply to Ending a 'next unless' loop... by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |