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 it more difficult to read. > croak "No report file system disk space usage (df) is specified" unless > $ARGV[0]; > my $filename=$ARGV[0]; croak "..." unless @ARGV; # OR: croak "..." unless @ARGV >= n; my ($filename) = @ARGV; > open my $file,"$filename |" or croak "cannot open $filename:$!"; You should be using the 3-argument version of open: open my $fh, '-|', $filename or croak "..."; It is safer to use and good practice to use always (but you especially need it here). See `perldoc -f open'. Regards, -- Brandon McCaig <bamcc...@gmail.com> <bamcc...@castopulence.org> Castopulence Software <https://www.castopulence.org/> Blog <http://www.bamccaig.com/> perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }. q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.}; tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say' -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/