in reply to Breaking huge text file apart
while( <IN> ) { chomp; my $title = substr( $_, rindex( $_, chr(15) ) + 1 ); }
There will be a few spaces left before the first 1 in "11th" but I figure you know how to deal with that. For instance, if there are a fixed number of spaces, you could say rindex( $_, chr(15) ) + 4. The key to the solution is the use of rindex, which will be a good deal faster than using a regex.
--
|
|---|