$ perl @ary = (1, -5, -12, 7, 3); $_ = 0 for grep {$_ < 0} @ary; print "@ary\n"; ^D 1 0 0 7 3