It looks like both "Script1.pl" and "Script2.pl" take the same command line args, so how about a "Script.pl" (not numbered), instead of a shell script, in order to pick the right one:
my $script = ( $^O =~ /linux|solaris/ ) ? "Script1.pl" : "Script2.pl";
exec $script, @ARGV;
That assumes that you've done "chmod +x" on Script1.pl and Script2.pl, and they are in your shell's PATH (e.g., if they are in your current working directory, then your PATH should include ".").
It might be even better if the differences between Script1 and Script2 could be merged into a single perl script, with appropriate logic to do things differently depending on the value of $^O. Then you don't need a separate "wrapper" script at all.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.