My question is what this line is doing:
$file =~ s,/,\\,g;
It is replacing / characters with \ characters in $file. The g causes the replacement to apply to all occurrences.
Commas were used as the delimiters to avoid escaping the / character. An equivalent statement would be:
$file =~ s/\//\\/g;Which many people find harder to read.
In reply to Re: grep for windows
by RonW
in thread grep for windows
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |