Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Crypt() usage

by BillKSmith (Monsignor)
on Jul 29, 2016 at 12:39 UTC ( [id://1168808]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Crypt() usage
in thread Crypt() usage

Line endings should only be an issue in I/O. By default perl strings use a single newline character as a record separator. PerlIO translates between this and whatever your OS requires. When processing files from another OS, specify the required translation on the open statement.
Bill

Replies are listed 'Best First'.
Re^4: Crypt() usage
by stevieb (Canon) on Jul 29, 2016 at 13:41 UTC

    ...or use File::Edit::Portable which does the translations automatically for you, cross-platform, so you don't have to figure out which ending to use yourself ;)

    use File::Edit::Portable; my $rw = File::Edit::Portable->new; my $fh = $rw->read('file.txt');

    Disclaimer: author of said module here

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found