in reply to Re: substring exists at particular postion?
in thread substring exists at particular postion?

I think that writing this out will turn out to be the most efficient method, except that you only need to get the substr once for your example:

while(<IN>) { my $t = substr($_, 259, 1); if($t eq "B") { print B $_; } else if ($t eq "T") { print T $_; } else if () { # and so on for at least 10 lines!... } }
-- Joost downtime n. The period during which a system is error-free and immune from user input.