in reply to
forcing list-context
Another way is to unload the readdir call into a temporary array and then call
scalar
on that e.g.
say scalar(@{[readdir $dh]});
[download]
Though this is not as economical (memory wise) as the above solution in
Re: forcing list-context
Comment on
Re: forcing list-context
Download
Code
In Section
Seekers of Perl Wisdom