On Tue, 2006-06-06 at 14:06 -0500, Lakshmi Sailaja wrote:
> Hello,
> 
> Can I include a korn shell script in a perl program?
> 
> I have done the following but I get a compilation failed error.
> abc is the ksh script.
> -----------------------------------------------------
> require "/home/xxx/yyy/abc";
> 
> Error: syntax error at /home/xxx/yyy/abc line 3, near "."
> Compilation failed in require at createPatch.pl line 11.
> -----------------------------------------------------

No, you would have to use a system() or a backtic:

  system( '/home/xxx/yyy/abc' ); # output not important

or

  my @output = `home/xxx/yyy/abc`; # output saved in @output

See `perldoc -f system` and `perldoc perlop` and search for "Quote and
Quote-like Operators"


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to