in reply to $var as accessor name?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: $var as accessor name?
by matija (Priest) on Mar 11, 2004 at 20:14 UTC | |
by ysth (Canon) on Mar 12, 2004 at 04:46 UTC | |
by BrowserUk (Patriarch) on Mar 12, 2004 at 05:32 UTC | |
by ysth (Canon) on Mar 12, 2004 at 07:33 UTC |