Double quotes interpolate backslashes, while single quotes don't, see perlop on Quote and Quote-like Operators. Also, you'll still be better off to correctly double the backslash, into C:\\cFiles, or, even better, avoid `dir /b $string` entirely and use the following:
use strict; use File::Glob qw(bsd_glob); my $string = "C:\\cFiles"; my $string = "C:/cFiles"; # works just as well here my $list = join "\n", bsd_glob $string;
In reply to Re: Text Processing
by Corion
in thread Text Processing
by kingjamesid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |