open(PS,"ps|"); while (my $thisLine = ){ #do something }