[ale] Perl Question

Chris Fowler cfowler at outpostsentinel.com
Tue Mar 2 09:27:25 EST 2004


I have a quickie.

I have many perl programs that have common code.  I want to somehow
include a perl program that defines functions for this code.  What is
the best way?

I also want to store variables in a central file and source them like I
can in bash.  I can not find the perl equivalent.  How can I do that?

Thanks,
Chris

On Mon, 2004-03-01 at 22:09, Fletch wrote:
> >>>>> "Bob" == Bob Kruger <bkruger at mindspring.com> writes:
> 
>     Bob> Simple Perl question for the group - is there a Perl function
>     Bob> that capture the space remaining on a mounted partition?
> 
> my $fs = "/foo";
> my( $used, $avail, $pct ) =
>   (split( /\s+/, `df -k $fs | tail -1` ))[-4,-3,-2];
> 
> 
> Not to mention searching for df on search.cpan.org sez:
> 
> 
> Filesys::DiskFree
> 
> Filesys::Df
> 
> Filesys::DiskSpace
> 
> 
> Never used any of them personally.  YMMV.
> 
> 



More information about the Ale mailing list