in reply to Re: Issue with env variables set through dos batch
in thread Issue with env variables set through dos batch
There is no DOS anymore.
The Windows command prompt is like one of the ~unix shells. for example:
is not needed!#------------------------------------------ my $operatingSystem = $^O; my $windows = "MSWin32"; my $unix = "hpux"; print "Running under ${operatingSystem} environment.\n\n"; my $pathSeparator = ""; if ( $operatingSystem eq $windows ) { $pathSeparator = "\\"; } else { $pathSeparator = "/"; } #------------------------------------------
pathSeparator of "/" works on Windows and ~Unix (LINUX, etc..)
Where it really matters, the logic above to determine the OS is woefully inadequate.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Issue with env variables set through dos batch
by akrrs7 (Acolyte) on Oct 13, 2011 at 16:08 UTC |
In Section
Seekers of Perl Wisdom