in reply to File Handle qwerk?

This is likely your problem:

$memcmd=`/usr/sbin/prtconf | grep Memory`;

...which you then later try to use as a new FileHandle.

Try changing that line* to:

$memcmd="/usr/sbin/prtconf | grep Memory |";

The alternative is to capture the full output of qx//:

@memcmd_output = `/usr/sbin/prtconf | grep Memory`;

... and then iterate over that ...

for my $line( @memcmd_output ){ # ... do your stuff on $line }

* Updated: ikegami pointed out a missing trailing vertical bar.

s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)