My guess is that perl is correct about there not being a file Script1.pl in your directory. Possible causes for this are:
- The current directory is not what you think it is. Print out the current directory before you start perl, maybe by doing cwd; before you launch Perl.
- The file looks like it has the name Script1.pl but really it doesn't. Maybe it is called script1.pl (note the lower-case "s"), or Scriptl.pl (note the letter ell instead of the digit one) or something like that.
But without knowing the setup, it's hard to tell. In my shell scripts, I always ensure that the current working directory is set to something sane by doing:
BASE=$(cd $(dirname $0);pwd)
This sets the shell variable $BASE to the directory where the script resides in. All other executions are then done relative to $BASE - in your case, I would use:
exec perl -w "$BASE/Script1.pl" "$@"
to launch the Perl script - maybe your stanza is better as it will preserve quotes - on my system, I don't have to fight with arguments with embedded whitespace.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.