Mike,

not sure if I understand you right, but to execute a shell command try and
examine the output/result of that command, try:

##############START CODE SNIPPET#################
use strict;

my $result = "";
my $cmd   = "C:\\Program Files\\mozilla.org\\Mozilla\\mozilla.exe";
##Double up the windows path specifiers in Perl.

##Using backticks around the command executes it and directs
##STDOUT to the variable. Similar to system() command.
$result = '$cmd';


##Now you can examine the $result variable to see the
##outcome of executing the command.
print STDOUT $result;
##############  END CODE SNIPPET#################

Hope this helps. If I missed what you really are trying to do - sorry.

;-)

                                                                           
                          Jonathan Hughes                                  
                                                                           
                          Tech Support Specialist                          
                          MCP / MCSD                                       
                                                                           
                          Goodyear South Africa                            
                                                                           





|---------+------------------------------------------->
|         |           "Michael W.Cocke"               |
|         |           <[EMAIL PROTECTED]>          |
|         |           Sent by:                        |
|         |           [EMAIL PROTECTED]|
|         |           veState.com                     |
|         |                                           |
|         |                                           |
|         |           05/28/2004 12:48 AM             |
|---------+------------------------------------------->
  
>-----------------------------------------------------------------------------------------------|
  |                                                                                    
           |
  |        To:      [EMAIL PROTECTED]                                           |
  |        cc:                                                                         
           |
  |        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