Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Search and replace in html

by kilinrax (Deacon)
on May 08, 2003 at 23:32 UTC ( #256710=note: print w/replies, xml ) Need Help??


in reply to Search and replace in html

Sounds like you could want to set the input record separator ('$/') to undef, then you'll pull the file in one huge chunk rather than line-by-line.

Try either of the following lines:

undef $/; local $/;

The first line will set '$/' to undef for the rest of the file, the second only for the enclosing scope (arguably better).

You might want to try reading perlvar to get a better idea what '$/' is, and maybe pick a better value to set it to.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2022-08-08 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?