Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: put file content into a string

by l3v3l (Monk)
on Dec 19, 2005 at 17:31 UTC ( [id://517822]=note: print w/replies, xml ) Need Help??


in reply to put file content into a string

You could also use the "-0777" command line switch if you were writing a quick solution to do something like parsing the entire input file as a single line in order to alter the newlines that otherwise require a range operator to deal with, ie:
perl -0777 -pe 's/\n+/\n/g' myFile
The value 0777 will cause Perl to slurp files whole because there is no legal byte with that value.

Log In?
Username:
Password:

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

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

    No recent polls found