in reply to Regexes Are Not For String Comparison
Because I have a real distaste for writing $_ explicitly whenever it's not absolutely necessary. This is partly for readability -- some of the Perl novices at my work are still afraid of $_ ... (And yet they don't mind the implicit use of $_. Strange.) And it's also just plain easier to type than the more proper alternative:foreach (@names) { next if /^buckaduck$/i; ... }
foreach (@names) { next if ( lc($_) eq lc('buckaduck') ); ... }
buckaduck
|
---|