I need the to convert the input address to specified format
#!/usr/bin/perl
my $file_path =\"\\\\\\abc.com\\a\\t\\temp\\L\\\\\";
#---- Help in this regex
$file_
I am guessing you want to normalise a UNC path, in which case the double \ at the beginning is important to keep, and the answers from Ether and KennyTM produce wrong results. Pick either one of the methods below.
use File::Spec qw();
print File::Spec->canonpath('\\\abc.com\a\t\temp\L\\');
use URI::file qw();
print URI::file->new('\\\abc.com\a\t\temp\L\\', 'win32')->dir('win32');
__END__
\\abc.com\a\t\temp\L\