That will return a list of hashes, each containing the information for each process where one of the fields matched one of the match values.sub match { my($self, @matches) = @_; my @fields = $self->fields; my @ret; for my $p (@{ $self->table }) { push @ret => { map {; $_ => $p->$_ } @fields } if grep { my $val = $_; grep { $p->$_ =~ $val } @fields } @matches; } return @ret; }
_________
broquaint
In reply to Re: $var as accessor name?
by broquaint
in thread $var as accessor name?
by matija
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |