how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- From: nntpman68 <news1234@xxxxxxx>
- Date: Sat, 28 Jun 2008 11:25:15 +0200
This raises an intersting pint )for me at least)
I'm not that used to perl globs:
let's assume I work in a setup where /home/*/.forward expands to > 15000 files.
What would happen if I use follwing statement in perl"
foreach my $file (</home/*/.forward>){
do_something($file);
}
would perl
- iterate through the files
- or would perl first create a list of all the files and then
iterate through them.
- or would it hit a linit and not provide all hits.
- or does it depend on the system perl is running on
?
Just being curious?
Big and Blue wrote:
RedGrittyBrick wrote:.Jens Thoms Toerring wrote:. . .
for i in `ls -a /home/*/.forward`; do rm $i; done
Neither of which would necessarily work if /home were an automount point, as "*" won't expand (and if it did, could have > 15000 matches in at least one case I know of, which is why you wouldn't want it to expand).
- 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:
- 'nobody' using sudo -- scary!
- From: Johnny
- Re: 'nobody' using sudo -- scary!
- From: Jens Thoms Toerring
- Re: 'nobody' using sudo -- scary!
- From: RedGrittyBrick
- Re: 'nobody' using sudo -- scary!
- From: Big and Blue
- 'nobody' using sudo -- scary!
- Prev by Date: Re: Perl search engine
- Next by Date: Re: Simplest way (or module) to tweak query in CGI server-side validation
- Previous by thread: Re: 'nobody' using sudo -- scary!
- Next by thread: Re: how do prlglobs expand (was Re: 'nobody' using sudo -- scary!)
- Index(es):
Relevant Pages
|