Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-22 Thread GRAEME F ST CLAIR
"Learning Perl" turns out to be the 6th edition. Oh my! I thought to myself, perhaps mine might be about the 4th or 5th edition - alas, it is the 2nd. Start saving... Tx & rgds, GFStC. On Fri, 21 Oct 2011 22:37:14 -0700 David Christensen wrote: The canonical book for learning Perl i

Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-22 Thread Brandon McCaig
On Sat, Oct 22, 2011 at 7:13 PM, Brian Fraser wrote: > I say this without a bit of sarcasm: Feel blessed in your ignorance of > formats. The declarations on top are unfortunately needed (If it helps, > think of formats using lexical variables as closures). > But you shouldn't be using formats. So

Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-22 Thread Brian Fraser
On Sat, Oct 22, 2011 at 4:57 PM, Brandon McCaig wrote: > On Sat, Oct 22, 2011 at 11:37 AM, timothy adigun <2teezp...@gmail.com> > wrote: > > my($filesys,$mbytes,$used,$avail,$capacity,$mount)=("","","","","",""); > > Declaring these variables here is useless (and initializing them > here is even

Need help in killing a job

2011-10-22 Thread Jag
Can some one help me on this. The routine below works, but kills only the parent job. I want all the jobs spaned by parent job $f to be killed. How to do that ? Thanks in advance. sub run_system_for_some_time { my $f = $_[0]; ## Job to run my $t = $_[1]; ## Max time job can run eval {

Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-22 Thread Brandon McCaig
On Sat, Oct 22, 2011 at 3:00 PM, Brandon McCaig wrote: > http://search.cpan.org/~abarclay/Filesys-DiskFree-0.06/DiskFree.pm I guess the proper way to post a CPAN link is with the 'permalink': http://search.cpan.org/perldoc?Filesys::DiskFree Regards, -- Brandon McCaig Castopulence Software

Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-22 Thread Brandon McCaig
On Fri, Oct 21, 2011 at 10:18 PM, newbie01 perl wrote: > At the moment am using > > system("df -k > /tmp/df_tmp.00"); > > To re-direct the df output. Am using df -k because some of the Solaris and > HP servers does not have df -h, by using df -k, am sure it will work on all > of them. Apparently

Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-22 Thread Brandon McCaig
On Sat, Oct 22, 2011 at 11:37 AM, timothy adigun <2teezp...@gmail.com> wrote: > my($filesys,$mbytes,$used,$avail,$capacity,$mount)=("","","","","",""); Declaring these variables here is useless (and initializing them here is even more useless). :-/ The lack of whitespace is also useless and makes

Re: Help with Getopt::Std

2011-10-22 Thread Peter Scott
On Sat, 22 Oct 2011 11:58:38 +1300, newbie01 perl wrote: > Am just trying to port 1:1. Quite painful trying to figure out how to > get awk-like behavior in Perl especially when trying to do some > calculation on some specific fields. Awk is Perl's closest ancestor on the evolutionary tree, from on

Re: HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

2011-10-22 Thread timothy adigun
Hi newbie01 perl, Try the code below and see if it works for you, it works well on my Ultimate Ubuntu OS. Assumptions in the code below: 1. you must pass df to the perl script on the Command Line Interface *e.g perl mydf.pl df*, 2. you don't have Perl6::Form installed, though you can get here h