Change
if (\%add($num) { .. }
to
if (add($num)) { .. }
In context, it would actually be:
sub is_image_size_ok { my ($image) = @_; my $img = get($image); my ($height, $width) = imgsize(\$img); return $height < $max_h and $width < $max_w; } push @array, $string =~ m#stuff#g if is_image_size_ok($image);
In reply to Re^5: adding an IF to a push
by ikegami
in thread adding an IF to a push
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |