Hi,

To open a file for reading do :
open(CRONJOB, "< /home/queue/test.sh");
@data = <CRONJOB>;
close(CRONJOB);
print @data;

To execute a file do :
system("/home/queue/test.sh", $return);

or:
exec("/home/queue/test.sh");


Regs David
--------------------
> 
> Hi guys,
> 
> I need to call shell executable from a perl command,
> and here is what I do:
> 
> open CRONJOB, "/home/queue/test.sh|" or die "Unable to
> open test.sh command: $!";
> 
> Unfortunately, neither tesh.sh executed nor I get
> "Unable to open test.sh" error message.
> 
> Does anyone know whats the problem is?
> 
> Thanks a lot!
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to