in reply to Perlish while loop
while (<$fh>) { if (/^M/) #What is this ? { chomp; my $filename = $_; $filename s,.*/,,; #strip off leading path info $seen->{$filename}++ if( $filename =~ /pdf/ || $filename =~ /msi/) } } if (! exists $seen->{'people.pdf'} ) { print "People not found\n"; } if (! exists $seen->{'animal.pdf'} ) { print "animal not found\n"; } if (! exists $seen->{'setup.msi')) { print "MSI file not found\n"; } exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perlish while loop
by Sun751 (Beadle) on Jul 16, 2009 at 23:58 UTC |