Cheerswhile (<$fh>) { if (/^M/) { my @output = split('/'); my $filename = $output[-1]; chomp($filename); if ($filename eq 'people.pdf') { $people = "1" }; if ($filename eq 'animal.pdf') { $animal = "1" }; if ($filename eq 'setup.msi') { $msi = "1" }; } } if (!(defined $people)) { print "People not found\n"; } if (!(defined $animal)) { print "animal not found\n"; } if (!(defined $msi)) { print "MSI file not found\n"; } exit;
In reply to Perlish while loop by Sun751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |