Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 ( #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? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2022-08-13 22:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?