punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
Morphological Monks,
Time flies like an arrow. Fruit flies like a banana.
This is going to turn out to be something maddeningly simple...
I migrated a script from one host to another. Works fine on the old. But on the new I get an error:
That line of code is a require:Bad name after main' at ../config.pl line 18.
to load up some configuration variables. The file is located up one directory from the script and is chmoded 755.require "../config.pl";
If I change the relative path to anything else - like ../../ or ./ or just the filename, then I get
and a list of the directories in @INC.Can't locate ../../config.pl in @INC (@INC contains: .....
Why the one error when the path is ../ and the other for any other path? Do I need to add something to @INC to include the current directory of the script that's running?
Thanks.
*****UPDATE*****
Solved - please see my last post below.
Time flies like an arrow. Fruit flies like a banana.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Bad Name or Missing @INC entry - "require" path fail.
by manorhce (Beadle) on Feb 26, 2013 at 07:05 UTC | |
Re: Bad Name or Missing @INC entry - "require" path fail.
by Khen1950fx (Canon) on Feb 26, 2013 at 07:20 UTC | |
Re: Bad Name or Missing @INC entry - "require" path fail.
by punch_card_don (Curate) on Feb 26, 2013 at 07:42 UTC | |
Re: Bad Name or Missing @INC entry - "require" path fail.
by punch_card_don (Curate) on Feb 26, 2013 at 07:30 UTC | |
by vinoth.ree (Monsignor) on Feb 26, 2013 at 07:41 UTC |
Back to
Seekers of Perl Wisdom