On 2/5/07, Tony Heal <[EMAIL PROTECTED]> wrote:

OK, so bash is the shell I am using and the df utility is a
standard Xnix command. My question is, is there a perl way
of getting the stats on partitions without having to shell out
using system() or exec()?

Well, this is not unlike asking if there's a way to get a hot meatloaf
out of the oven without having to put on oven gloves. But yes, you
could write Perl code (perhaps with a little XS to handle a system
call or two; I'm not sure) to do what df does. It probably won't be as
fast, secure, portable, or easy to write as using system() to invoke
df, but on the plus side you'll get to debug it all yourself. And
since it has to run with special privileges, you might even break
something important along the way, or open a security hole without
realizing it.

Is there some reason you can't use oven gloves? I mean df?

Cheers!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to