note
Moron
To question assumptions as I usually do these days... <i>die</i> is normally for programming errors, whereas this looks more like a fatal data issue, which should be handled in a different way, e.g.:<code>
<>;
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;
}
</code>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-493758">
<p>-M<p><i>Free your mind</i>
</div></div>
499070
499070