Re: open file limits/ perl
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: open file limits/ perl




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: open file limits/ perl  
Rainer Weikusat


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:31 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register