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

Re: problem path stored in hash

by JediWizard (Deacon)
on Jun 25, 2010 at 16:01 UTC ( #846547=note: print w/replies, xml ) Need Help??


in reply to problem path stored in hash

I'd bet dollars to donut's you have a carriage return character ("\r") at the end of $config{'workingDir'}. Try:

$config{workingDir}=~s/\s+$//g;

Edit: The carriage return could also be at the front of $filename, but it seems far more likely it is at the end of $config{workingDir}. My guess: the hash %config is probably read in from a file created on a windows system, but the code ir running in *NIX. Windows uses: "\r\n" at the end of a line, *NIX only expects "\n", and hence when reading a line in from the file you are left with an extra "\r" at the end. Another solution would be to run the dos2unix command on the config file to remove the extra "\r" characters.


They say that time changes things, but you actually have to change them yourself.

—Andy Warhol

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2021-06-19 10:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (92 votes). Check out past polls.

    Notices?