Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Unsuccessful stat on file test

by spork (Monk)
on Mar 02, 2008 at 18:41 UTC ( [id://671520]=note: print w/replies, xml ) Need Help??


in reply to Re: Unsuccessful stat on file test
in thread Unsuccessful stat on file test

Just curious Corion...what makes chomp more fragile?

Replies are listed 'Best First'.
Re^3: Unsuccessful stat on file test
by Corion (Patriarch) on Mar 02, 2008 at 18:43 UTC

    In my experience, any whitespace at the end of what should be a filename is extraneous.

    Often, files which list filenames come with Windows line endings (\x0D\x0A) and on Unix, chomp will only remove the \x0A, leaving remaining but erroneous whitespace.

      Make sense. I have never used chomp when the extra spaces were a factor in processing.

      Thanks for the tip.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-06-20 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.