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* tru
Gerard Robin wrote:
On Sat, Sep 17, 2005 at 08:20:55PM +0530 Binish A R wrote:
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 = [ get
On Sat, Sep 17, 2005 at 08:20:55PM +0530 Binish A R wrote:
> 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() ]) {
> last unless @$ref;