in reply to Substr warning
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";
|
|---|