Unix Programming - Re: open file limits/ perl

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2007 > Re: open file limits/ perl





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: open file limits/ perl
Rainer Weikusat

2007-01-26, 1: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 ...
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com