Ok, but u have to execute the Perl script within the shell dont u? And is it the case you can do a lot of shell script stuff with PERL i.e i/o file manipulation etc. So if you wanted to move files fro, Dir Aa to B you would use the appropriate sh commands (Im assuming sh here). But, if for some reason you wanted to do the same with PERL you would srite the perl script but you would still have to call the script from within sh so effectively you would need to enter the appropriate sh to call the Perl script...
Main Topics
Browse All Topics





by: sjm_eePosted on 2008-02-18 at 05:47:12ID: 20919810
There is no such thing as "a perl shell script" as there is no "shell" whose scripting language is "perl". However, both perl scripts (aka programs) and shell scripts can be run by Unix-like environments by putting them in a executable file as follows:
#!/bin/sh
# The following is a shell script
echo "Hello World!"
#!/usr/bin/perl
# The following is a perl program
print "Hello World!"
Both of these work because of the way that a Unix-like environment treats executable files starting with the character sequence hash-exclamation.