Greg wrote:
I have an input file that I have to evaluate whether to include lines based upon their last character. Is there a simple regex that would allow me to assign the very last character to a variable?In my case it will either be A or I (capital i) if that helps?
while ( <$fh_in> ) {
my ($tail) = / ( [AI] ) $/x or next;
if ( $tail eq "A" ) {
...
}
else {
....
}
}
--
Ruud
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
