in reply to Error on converting 5.0 script to 5.6 script

When you invoke your script like you are doing:

perl -c nc_pf_56mainmenu.pl

... you are not running the perl interpreter that is on your shebang line: you are explicitly running the first perl that is found in your PATH. Try one of the following:

--
3dan

  • Comment on Re: Error on converting 5.0 script to 5.6 script

Replies are listed 'Best First'.
Re2: Error on converting 5.0 script to 5.6 script
by dragonchild (Archbishop) on Sep 10, 2003 at 15:52 UTC
    Another, slightly less secure, option is to do /usr/bin/env perl5_6_1 and that will execute the first perl5_6_1 in your $PATH. The reason it's less secure is that it depends on your path, which could be hijacked. It's always best, in production code, to be as explicit as possible.

    ------
    We are the carpenters and bricklayers of the Information Age.

    The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.