Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^3: Entry widget not accepting /

by zentara (Archbishop)
on Oct 05, 2012 at 13:56 UTC ( #997480=note: print w/replies, xml ) Need Help??

in reply to Re^2: Entry widget not accepting /
in thread Entry widget not accepting /

I get your code to run, and observe the error of / not being accepted. Your code is a bit complicated, and I will look at it, but just as a first comment I noticed one oddity. If you enter a \ instead of a /, a / will be inserted properly. ?? This link perl-getcwd-ending-forward-slashes may yield a clue.

I'm wondering why you even use File::Spec's catdir? The docs say

Concatenate two or more directory names to form a complete path ending with a directory. But remove the trailing slash from the resulting string, because it doesn't look good, isn't necessary and confuses OS/2. Of course, if this is the root directory, don't cut off the trailing slash :-)

When I comment out all the File::Spec canonpath and catdir lines from your script, it adds a / just fine.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2016-10-22 08:34 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (294 votes). Check out past polls.