in reply to Win32 spaces in path, open Excel w/ 'system' and glob/DosGlob
#!/usr/bin/perl -wl my $str = 'C:\Program Files\Microsoft Office\Office\Excel.exe'; $str = quotemeta $str; print $str; __END__ prints: C\:\\Program\ Files\\Microsoft\ Office\\Office\\Excel\.exe
Or convert the backslashes to forward slashes:
$str =~ s[\\][/]g;
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Win32 spaces in path, open Excel w/ 'system' and glob/DosGlob
by ff (Hermit) on Oct 23, 2003 at 12:35 UTC |