Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: In my perl script one of the variable it is giving an extra dot.

by hippo (Bishop)
on May 25, 2022 at 09:23 UTC ( [id://11144182]=note: print w/replies, xml ) Need Help??


in reply to Re: In my perl script one of the variable it is giving an extra dot.
in thread In my perl script one of the variable it is giving an extra dot.

Note that the rel2abs approach will only give the same result if / is the CWD. Otherwise it's a different result:

#!/usr/bin/env perl use strict; use warnings; use File::Spec; chdir '/tmp'; my $path = './root/git/common/crt_del/cert/DEFAULT.pem'; $path = File::Spec->rel2abs ($path) unless File::Spec->file_name_is_absolute ($path); print "$path\n";

🦛

  • Comment on Re^2: In my perl script one of the variable it is giving an extra dot.
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-23 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found