O.K. -- syntax kills me again. Many thanks for the help.#!/usr/local/bin/perl -w use FileHandle; $memcmd=`/usr/sbin/prtconf | grep Memory`; $tmem = 0; $tmem_idle = new FileHandle ("$memcmd") || die "Could not open pipe fo +r prtconf: $!\n"; while (<$tmem_idle>) { if ( $_ =~ m/^.*\s+(\d+)\s+\d+$/ ) { $tmem = $1; } } close $tmem_idle; $tmem_busy = $tmem; # Just print the info! print "The total Memory amount is: $tmem_busy"; exit 0;
In reply to File Handle qwerk? by mbayer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |