Keep It Simple, Stupid | |
PerlMonks |
Re: In my perl script one of the variable it is giving an extra dot.by Discipulus (Canon) |
on May 25, 2022 at 08:19 UTC ( [id://11144180]=note: print w/replies, xml ) | Need Help?? |
Hello Anonymous Monk, 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
L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|