Alternatively, you can use the system command:

my $program = "c:\\Program Files\\any directory\\any program";

  # qq interpolates $program; '' (single quotes) do not!!
my $command = qq{start "" "$program"};
system ($command);


Regards,

Sui

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
W.Cocke
Sent: Thursday, May 27, 2004 6:49 PM
To: [EMAIL PROTECTED]
Subject: 'shell' on ASPerl for Win32 

I'm trying to execute a command stored in a variable - specifically

C:\Program Files\mozilla.org\Mozilla\mozilla.exe

 use Shell;
 my $sh = Shell->new;
 print $sh->$w;

isn't it.  No variation on quoting seems to work - I either get 'the
system cannot locate the file (and yes, it IS there) or I get various
errors in the sub shell command regarding eval and invalid separators.
I've run thru almost every error message that there is...  What's the 
syntax? 

Thanks!

Mike-

--
If you're not confused, you're not trying hard enough.
--
Please note - Due to the intense volume of spam, we have installed site-wide
spam filters at catherders.com.  If
email from you bounces, try non-HTML, non-encoded, non-attachments,

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to