At 01:10 PM 6/20/01 -0400, Yacketta, Ronald wrote:
> > my $timex = `(timex ps -ef > /dev/null) 2>&1`; # /dev/null
> > has 2 ells on
> > my system
> > $timex =~ tr/\n//s; # Embedded and trailing blank lines
> > $timex =~ s/^\n//; # Leading blank line
>
> @oratime = qx((timex ps -ef > /dev/null) 2>&1 );
> foreach my $holder (@oratime) {
> $holder =~ tr/\n//s;
> $holder =~ tr/^\n//;
> $holder =~ s/^\s+//;
> print ": $holder\n";
> my ($key,$value) = split($holder);
> $otime{$key} = $value;
That's not the same as what I posted. If you want to use the backticks in
list context instead of scalar, then try this:
for (`(timex ps -ef > /dev/null) 2>&1`) {
next unless /\S/;
print;
my ($key, $value) = split;
$otime{$key} = $value;
}
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com