# Function Name : windowsSlash
# Input : String with or without slash
# Output : Path with double backslash
# Description : This function will convert all forward slash (/) to double backward slash(\\). Also,
# extra slashes will be removed.
#
sub windowsSlash($)
{
my ($str) = @_;
$str =~ s/\/\//\//g;
$str =~ s/\//\\\\/g;
return $str;
}
No comments:
Post a Comment