01-26-07 06:18 PM
jt@toerring.de (Jens Thoms Toerring) writes:
> Rainer Weikusat <rainer.weikusat@sncag.com> wrote:
>
>
>
>
>
>
> You're supposed to put an ampersand in front of the "constant":
>
> POSIX::sysconf(&POSIX::_SC_OPEN_MAX)
I am not supposed to put an ampersand in front of the constant,
because this is no longer needed for subroutines calls in PERL since
perl 5. But using the & triggers the responsible AUTOLOAD, while the
name is otherwise just treated as a bareword. This is apparently an
undocimented implementation quirk of the POSIX-module. Another version
that works:
use POSIX qw(sysconf);
sub POSIX::_SC_OPEN_MAX;
printf "%s\n", sysconf(POSIX::_SC_OPEN_MAX);
Another PERL oddity to know about ...
[ Post a follow-up to this message ]
|