in reply to windows perl and paths
Hello flieckster,
You only have to escape the backslashes if the string is double-quoted. So if you don’t need interpolation, the following are equivalent:
my $wilsonstiff = "Z:\/Partners\/Wilsons\/2push_test"; my $wilsonstiff = 'Z:\Partners\Wilsons\2push_test';
But as stevieb says, Windows understands forward slashes anyway, so you can just say:
my $wilsonstiff = "Z:/Partners/Wilsons/2push_test";
and it will still work, and allow variable interpolation if needed. For the various quoting options in Perl, see perlop#Quote-Like-Operators.
Hope that helps,
Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: windows perl and paths
by AnomalousMonk (Archbishop) on Nov 19, 2016 at 18:02 UTC | |
by ww (Archbishop) on Nov 19, 2016 at 19:03 UTC | |
by AnomalousMonk (Archbishop) on Nov 19, 2016 at 19:59 UTC | |
by Athanasius (Archbishop) on Nov 20, 2016 at 04:02 UTC | |
by eyepopslikeamosquito (Archbishop) on Nov 20, 2016 at 05:37 UTC |