in reply to Regular Expression Question
OOTOMH...
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
while (<FILE>) { my $boxname; if ( ! ( /^Filesystem/ ) ) { $boxname = $_; } else { while (<FILE>) { my ( $title, $blocks, $used, $avail, $percent, $mounted ) += split /\s+/; last if ( !defined( $title ) ); my $number = ( $percent =~ /(\d*)\%/ ); if ( $number > 88 ) { print "$boxname's $title is at $percent!\n"; } } } }
Update Should be split \/s+\ rather than \/s*\
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
In Section
Seekers of Perl Wisdom