Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- From: xhoster@xxxxxxxxx
- Date: 13 Jul 2008 20:34:31 GMT
Ben Morrow <ben@xxxxxxxxxxxx> wrote:
Quoth "John W. Krahn" <jwkrahn@xxxxxxx>:
Joe Smith wrote:
Hans Mulder wrote:
If you really don't want to have the whole list in memory, you'll
have to roll your own glob using readdir. Something like:
opendir HOMES, "/home" or die Can't read /home: $!";
while (my $entry = readdir(HOMES)) {
The first call to readdir() in scalar context will read the entire
list into memory
No it won't.
(deja vu anyone?) Yes it will.
No it won't.
We have now switched from glob to readdir. Different functions,
different behaviors. (I missed that transition myself at first.)
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
.
- Follow-Ups:
- Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- From: Ben Morrow
- Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- References:
- Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- From: Hans Mulder
- Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- From: Joe Smith
- Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- From: John W. Krahn
- Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- From: Ben Morrow
- Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- Prev by Date: FAQ 2.4 I copied the perl binary from one machine to another, but scripts don't work.
- Next by Date: Odd error message on open()-ing scalar ref
- Previous by thread: Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- Next by thread: Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- Index(es):
Relevant Pages
|