It looks to me like you're trying to grab the first two words out of each line... maybe a different approach would work better?
Trekmy $line = 'This is a test'; my (@words) = split( /\s+/, $line); my $twowords = $words[0] . ' ' . $words[1]; print "$twowords\n";
In reply to Re: Substr warning
by TrekNoid
in thread Substr warning
by New Novice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |