http://www.perlmonks.org?node_id=46168

Anish has asked for the wisdom of the Perl Monks concerning the following question:

This one is weird question,but if answer to this question is YES, then it will help me out a lot.my question is, Is it posiible to call perl script inside a shell script i.e. can I write both script in one file for e.g.
#!/bin/ksh #some shell script code ... .... #perl script begains here #!/usr/bin/perl #some perl script code .. .. .. close(file) exit 0; #end of perl script #continuation of original shell script #this part of shell script will use output from above perl script ... ... ... exit 0; #end of shell script
or I have to write a perl script and shell script in different file and call perl script inside shell script by the flle name(That's what I do right now)