> I really want to be able to use the same set of scripts on a Unix machine,
> but have run across the problem that, unlike Windows NT, Windows 2000
> doesn't cope at all with Unix-style forward slashes (eg. can't do a cd
> d:/myprograms/mysubdir you have to do a cd d:\myprograms\mysubdir)
That is odd, I have the same scripts running here on AS-Perl 5.6 with out
problem on both WinNt and Win2000 Adv Server. There are chdir's in most of
the scripts I run on the 2000 server as it is running IIS 5.0 which does the
pathing differently.
chdir "d:/dopplegangers/cgi-bin";
Thats how I do mine with out problem on Win2k
> Does any one know of a way to deal with this? Even a way to find out what
> OS the script thinks it's running in, so I could then have a switch to say
> which style of slashes to use?
Another way I have found is that on a Win32 system there is an Env varriable
called WINDIR on windows machines.
foreach $env (keys(%ENV))
{
print "<b>$env = $ENV{$env}<br><br>\n";
}
The $env will return WINDIR and $ENV($env) will return the path win question, c:\winnt
etc...
> A further question: is there a better way of starting myprogram.exe without
> relying on the system("start /b myprogram") command? My main reason for
> doing it this way is that I do not want a new window started every time I
> launch myprogram (I launch about 12 programs ... would end up with a lot
> extraneous windows), and I need to be able to return to the script (so exec
> wouldn't work).
I use this to set up accounts on our mail server for a web based for, it has to call
an app mdaddusr.exe and the following is how I call it.
$apppath = "n:/mdaemon/app/mdaddusr.exe";
$domain = "\@dopplegangers.com";
$fname = $FORM{'fname'};
$lname = $FORM{'lname'};
$aname = $FORM{'account'};
$pass = $FORM{'password'};
$uname = "$fname $lname";
$app = "$apppath $aname$domain $pass \"$uname\"";
$app (above) returns the output of the command line. This is probably NOT a truely
correct way to do
this but it works just fine for me...
Hope this helps,
Emo1313
Soylent Green Is People!
Dopplegangers News And Non-Sence - www.dopplegangers.com
Emos World - www.dopplegangers.com/emo1313
Post Cards For The Ill Minded - www.dopplegangers.com/cards
----- Original Message -----
From: Andrea Snadden <[EMAIL PROTECTED]>
To: Perl-Win32-Users Mailing List <[EMAIL PROTECTED]>
Sent: Thursday, May 25, 2000 12:00 AM
Subject: using Unix style slashes on WinNT and Win2000?
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]