Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: put file content into a string

by l3v3l (Monk)
on Dec 19, 2005 at 17:31 UTC ( #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? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2022-05-17 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (65 votes). Check out past polls.

    Notices?