|Syntactic Confectionery Delight|
Shell characters coming back to bite me.by mull (Monk)
|on Mar 20, 2012 at 14:01 UTC||Need Help??|
mull has asked for the
wisdom of the Perl Monks concerning the following question:
Working on an old Darwin 8.1 box where there have been layers of ACLs applied. The only native tools supplied to work with the ACLs are extended versions of ls and chmod.
We need to move off this box so to help I'm creating a script that produces an ACL map for a given user.
To my delight I've found that the file and directory names contain lots of interesting characters I have to be able to handle.
So far this works but I'm concerned that it blows up if I encounter anything with a " character in the name.
I've been searching for a better way but I need hints.
I'm interested in the 3 arg version of open() but so far I've been unable to get it working for this task; the spaces and shell chars are passed to ls and it seems I'm back to square one.open RES, "-|", "ls -lde $_";