Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

RE: Re: searching backwards in a string

by Anonymous Monk
on Jun 14, 2000 at 03:36 UTC ( [id://18009]=note: print w/replies, xml ) Need Help??


in reply to Re: searching backwards in a string
in thread searching backwards in a string

>> while($text =~ /(.{0,80})\s+/g) { # result in $1 } << I believe that the above snippet is an infinite loop. However, if TEXT is a filehandle then while(<TEXT> =~ /(.{0,80})\s+/g){ # result in $1 } should kill all trailing space and line returns. Isn't that what chomp is for, though?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found