<>; if ( /^aaa/ ) { DataFatal( "problem-description, for $_" ); } chomp; my $file = $_; if ( /okregexp/ ) { #do something } else { #matches neither! # this case wasn't mentioned, by the way! } sub DataFatal { # fatal messaging. print STDERR "*** DATA FATAL ***\n+++ " . shift . " +++\n"; exit 1; }
-M
Free your mind
In reply to Re: unless/if
by Moron
in thread unless/if
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |