Mega Code Archive
Categories
/
Perl
/
Regular Expression
Grep {$_ = 2}
@array1 = (1, 1, 1, 1); @array2 = grep {$_ *= 2} @array1; print @array1[1];