Eric Lewton wrote:
> Odd, I know but a script I have, which works fine when I am logged
> into the computer directly, does not work through telnet or cgi-bin
>
> If anyone has resolved a similar error, I would love to learn how.
>
> when using telnet, it presents the folowing errors.
>
>
> Use of reserved word "our" is deprecated at
> /u3/maths/2006/og/lib/WWW/Mechanize.pm line 15.
It looks like you might have two versions of perl installed and that you
are calling a different interpreter in different environments.
I assume that when your script works from a command prompt you are
calling it using:
perl scriptname.pl
rather than ./scriptname.pl , since otherwise the perl interpreter used
is defined on the first line of the script and is not influenced by the
environment.
Try running "perl -v" and "which perl" both on your direct login and
when you log in through telnet and I guess that you see something
different. Your direct login is using a more recent version of perl
(>=5.6.x) than the version you see in telnet. (I'm assuming here that
both logins are on the same machine, but you don't say that).
To fix your problem, find where the newer version of perl is installed,
then put that location on the first line of your script
#!/usr/this_is_the_new/perl
...and then call your script as ./scriptname.pl (which is probably what
your web server will also do), and you will always use the correct
interpreter.
If your two sessions are actually on different machines then you should
upgrade the older version of perl to something more recent.
Hope this helps
Simon.
|