in reply to In my perl script one of the variable it is giving an extra dot.
if you want to use the regex be sure to use an anchor to just remove a dot in the beginning of the string: /^\./ being the dot a special regex char you need to escape it.
For a more robust solution use File::Spec file_name_is_absolute and rel2abs
# something like.. $path = File::Spec->rel2abs( $path ) unless File::Spec->file_name_is_a +bsolute( $path )
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: In my perl script one of the variable it is giving an extra dot.
by hippo (Archbishop) on May 25, 2022 at 09:23 UTC |