[Chicago-talk] chown inside a script

Andy Lester andy at petdance.com
Wed Dec 5 13:58:09 PST 2007

> I've tried various incantations of the wildcard but none work.  Is
> there some sort of quoting I should be using to make this work, or
> some other secret?

The shell is what does the globbing, but you're not calling the  
shell.  You're calling chown directly.

> I'd rather use a wildcard than globing a list of files to iterate  
> over.

You don't need to iterate.  Pass all the filenames as arguments to  

system( 'chown', 'whoever', glob( '/home/blah/blah/whatever*' ) );

Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance

More information about the Chicago-talk mailing list