Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Issue with env variables set through dos batch

by Marshall (Prior)
on Oct 13, 2011 at 15:51 UTC ( #931289=note: print w/ replies, xml ) Need Help??


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:

#------------------------------------------ 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 = "/"; } #------------------------------------------
is not needed!

pathSeparator of "/" works on Windows and ~Unix (LINUX, etc..)

Where it really matters, the logic above to determine the OS is woefully inadequate.


Comment on Re^2: Issue with env variables set through dos batch
Download Code
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
    I really appreciate your input..however it does not answer my question on the environment variables. I'm not really concerned about the part of the perl script with the check for the os...I'm not using that $pathSeparator variable anywhere.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://931289]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-08-01 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls