Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Crypt() usage

by talexb (Chancellor)
on Jul 28, 2016 at 21:26 UTC ( [id://1168764]=note: print w/replies, xml ) Need Help??


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

.. and, related to that, I wonder if the different line-endings (in Linux and Windows) might result in a different crypt result. I only have Windows here at work, so I cannot test this hypothesis right now.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
Re^3: Crypt() usage
by BillKSmith (Monsignor) on Jul 29, 2016 at 12:39 UTC
    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

      ...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://1168764]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found