Don't ask to ask, just ask | |
PerlMonks |
Re: expanded "ls"by nothingmuch (Priest) |
on Aug 11, 2005 at 10:27 UTC ( [id://482897]=note: print w/replies, xml ) | Need Help?? |
exec can be given arrays, so you don't need to quote arguments.
to get the pipe open behavior you can pipeopen ls, and then exec the pager: FYI, that is how the shells do it: they create the pipeline descriptors, fork off children for the processes, dup the filedescriptors to stdin/stdout as appropriate, and then exec the subproccesses. If you insist on quoting and concatenating there are cpan modules to do this more safely. map { } in void context is silly: To check if you have less, don't make assumptions based on the platforms. Instead:
Lastly, all of this could be completely superceded with a shell alias =)
-nuffin zz zZ Z Z #!perl
In Section
Code Catacombs
|
|