Binish A R wrote:
> Hello,

Hello,

> I've a doubt with getpwent function.
> The following code [ getpwent in list context ] is getting into an infinite 
> loop:
> 
> #!/usr/bin/perl -l
> 
> while ($ref = [ getpwent() ]) {
>       print $ref->[0];
> }

A reference in boolean context is *ALWAYS* true.



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to