my $var = sub { $_[0]->{this} eq 'that' }; foreach my $hash_ref (@a) { if ($hash_ref->{this} eq 'that') { ... } if ($var->($hash_ref)) { ... } }
In reply to Re: How to pass a variable string as conditional argument to if statment
by ikegami
in thread How to pass a variable string as conditional argument to if statment
by sgrey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |