This idiom, I love it so much but I use it fairly infrequently, but it’s absolutely gorgeous

[code lang=”perl”] #Assign to another variable the result of a RegEx] ($new= $old) =~ s|foo|bar|g;


And this one I just forget, because I tend to use hashes

[code lang=”perl”] #Remove element from an array based on index: splice(@array, 3, 1); [/code]