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

Re: problem path stored in hash

by JediWizard (Deacon)
on Jun 25, 2010 at 16:01 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://846547]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-19 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found