Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Substr warning

by TrekNoid (Pilgrim)
on Sep 24, 2004 at 15:21 UTC ( [id://393546]=note: print w/replies, xml ) Need Help??


in reply to Substr warning

There's not a lot to go on here, but my gut feeling is that $ch_count must be getting larger than the string you're looking at.

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?

my $line = 'This is a test'; my (@words) = split( /\s+/, $line); my $twowords = $words[0] . ' ' . $words[1]; print "$twowords\n";
Trek

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://393546]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-19 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found