in reply to File Handle qwerk?

As Fletch points out, you might as well use Perl to pull out the line you want from the prtconf output. It is a good idea to use strict; and three argument opens.

use strict; use warnings; my $prtconfCmd = q{/usr/sbin/prtconf}; open my $prtconfFH, q{-|}, $prtconfCmd or die qq{fork: $prtconfCmd: $!\n}; my $memVal = q{}; while ( <$prtconfFH> ) { next unless m{^Mem.*?:\s+(\d+\s+\S+)}; $memVal = $1; last; } close $prtconfFH; print qq{Total memory is: $memVal\n};

I hope this is of use.

Cheers,

JohnGG