Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Entry widget not accepting /

by kcott (Abbot)
on Oct 06, 2012 at 01:51 UTC ( #997561=note: print w/ replies, xml ) Need Help??


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

G'day ghosh123,

The Entry widget is accepting a forward slash (/)!

I added an additional print statement to sub buildPath {...}:

sub buildPath { my $path = shift; print "buildPath : BEFORE canonpath: $path :\n" ; $path = File::Spec->canonpath($path); print "buildPath : After canonpath: $path :\n" ; ...

The output before and after canonpath() is:

... buildPath : BEFORE canonpath: /home/ghoshabh/ : buildPath : After canonpath: /home/ghoshabh : ...

Here's a workaround which I've successfully tested:

sub buildPath { my $path = shift; my $trailing = $path =~ /\/$/ ? '/' : ''; ... return $path . $trailing; }

-- Ken


Comment on Re^3: Entry widget not accepting /
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2015-07-31 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls