Perl problems...

Edward Glowacki glowack2@key-largo.cl.msu.edu
Mon, 3 Apr 2000 15:29:26 -0400 (EDT)


OK, I'm really really confused now...  Is there any difference between
these two, because they don't behave the same:

First line of script.pl:
#!/usr/bin/perl -w -I/usr/local/etc -I/usr/local/bin

Command line:
# perl -w -I/usr/local/etc -I/usr/local/bin script.pl


The script, when run with the first produces the error:
# ./script.pl
VERSION: Undefined variable.
#

The first non-comment line in the script is interestingly:
$VERSION = "v1.4";

The script, when run with the second form seems to run OK until it forks
and execs a child script, which seems to be outputting the following:
=: not found
=: not found
die: not found
require: not found
die: not found
/usr/local/bin/script.pl: 16: Syntax error: word unexpected (expecting  ")")

When run by itself, the child script reports:
# ./child.pl
CURRENT: Undefined variable.
#

Again, the first non-comment line in the script is of the same form:
$CURRENT = $ARGV[0];

The child scripts are in production on another box, and the only
thing different between the two is the paths included with -I which
reflect a relocation of files.  There is only one "require" statement, and
that includes a full path to the file, so actually for this script the
-I's aren't needed.  I'm stumped and frustrated, generally "perl -w" does
a much better job of telling me what's wrong than its doing today...

Any thoughts on things I might try?


-- 
Edward Glowacki				glowack2@msu.edu