|
Posted by Dale on August 4, 2005, 8:29 pm
Please log in for more thread options
>
>
>>
>> The problem comes from users running the same perl script, which starts
> off
>> with #!/usr/local/bin/perl. I presume this means that everyone is using
> the
>> same Perl installation.
>
> That's not necessarily so - on Linux, at least. On my Linux box I have a
> /usr/bin/perl (used by the system and root) and a /usr/local/bin/perl
> which
> user uses. I always run my scripts as 'perl script.pl' - so there's no
> need
> for a shebang line and my scripts generally don't have one.
>
> I find that running as root, 'perl script.pl' always uses /usr/bin/perl,
> even if 'script.pl' begins with #!/usr/local/bin/perl.
>
> Conversely, running as user, 'perl script.pl' always uses
> /usr/local/bin/perl, even if 'script.pl' begins with #!/usr/bin/perl.
>
> I don't know how it is in your case - your presumption may well be correct
> (if you run your scripts as simply 'script.pl', it probably is) - I just
> thought I'd mention this in case your presumption is incorrect :-)
>
> Could be worth finding out for sure with a script that simply prints out
> the
> value of $^X.
>
> Cheers,
> Rob
>
>
Well now, that IS interesting. I will look at this first thing tomorrow and
let you know after work. Thanks, your insight has been helpful.
Dale
|