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

i am having a simple shell script in which i check which operating system i am in and then depending of that i try to execute a perl script

my shell sctipt looks like

echo $OSTYPE sac=$OSTYPE if [ $sac = linux ]||[ $sac = solaris ]; then eval 'exec perl x -S $0 ${1+"$@"}' else eval 'exec perl x -S $0 ${1+"$@"}' fi

i want to pass all my command line arguments frm shell to perl program.
i will execute my shell script with ./shellscript -rtos -file test1.
is the was i am doing is correct and will it pass all my arguments also because here i am gettign message like ...
Can't open perl script "": No such file or directory even though it is present there is same folder as shell script

20060328 Janitored by Corion: Added formatting, code tags