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 Script1.pl –x -S $0 ${1+"$@"}' else eval 'exec perl Script2.pl –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 "Script1.pl": 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


In reply to execute perl script frm shell script by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.