tags:

views:

90

answers:

0

I ran into a problem that I've never seen before and can't exactly explain. I was helping someone run a perl based install on a RedHad 4.6 zLinux and running under sudo seemed to grab the system perl rather than the fully qualified perl executable.

Example:

/my/perl/bin> ./perl -v == 5.8.8
/my/perl/bin> /my/perl/bin/perl -v == 5.8.8
/my/perl/bin> sudo /my/perl/bin/perl -v == 5.8.5????

Even though we were fully qualifying the path to our perl it was still grabbing /usr/bin/perl when running under sudo. I have no idea why, any gurus know?