For example, my directory is "c:\\temp\\\\" (ending with 4 back slashes). ... $ScriptDir="C:\\temp\\\\";
Note that this string doesn't end in four backslashes, it ends in two - "\\" represents a single backslash. Anyway, File::Spec's canonpath is your friend:
use File::Spec::Win32; my $ScriptDir="C:\\temp\\\\"; print $ScriptDir,"\n"; # => C:\temp\\ $ScriptDir = File::Spec::Win32->canonpath($ScriptDir); print $ScriptDir,"\n"; # => C:\temp
In reply to Re: Search & Replace repeating characters
by haukex
in thread Search & Replace repeating characters
by g_speran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |