On Tuesday, Nov 18, 2003, at 09:35 US/Pacific, Dan Muey wrote: [..]

Thanks. What I really want to do is avoid system commands completely. I could always traverse the directory adding the size of each file together and do that all in Perl with no system commands but I figured there'd already be a Module or something like this, so I want to do it that way. Somthign like:

my $sz = $module->size("/home/joemama");
# return sixze of file or of entire directory if specified file is a directory

I can appreciate the desire, but remember that "systems applications" - such as 'du' and 'ps' are there so that folks do not have to know all of the OS specific underlying 'system calls' that will flop into 'kernal space'.

The fine folks who are maintaining the Proc::Table
module deliver XS code that gets converted into
the 'c' code that becomes the dynamically loadable
library that is referenced in the "perl module"....

Which is why I opted to take the 'sillier' path
of simply working out which command line arguments
were the 'right ones' for Me based upon the four
or five basic *nix versions that I work with and
then go through the process that way.

If you want to have fun, then you will of course
want to become friends with stat(), cf perldoc -f stat
and/or read the POSIX module, cf perldoc POSIX.

Or download a copy of the open source for 'du'
and work out which parts of it you want to use
as the basis for your own perl module.


ciao drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to