[pm-h] Discussion about delimiters for m//

Todd Rinaldo toddr at cpanel.net
Sun Feb 16 20:28:24 PST 2014


On Feb 15, 2014, at 10:55 PM, Michael R. Davis <mrdvt92 at yahoo.com> wrote:

> 
>> "You write code as if the person who will maintain your code is a
>> violent psychopath who knows where you live." -- John F. Woods
>> 
>> Thinking about the person who will maintain your code is always a good
>> thing.  
> 
> Now that I been using Perl for almost 20 years.  I tend to be nice to myself and go back and update the variable names and I always use the m in a match and only ever use m// or m{}.

I think the trickster in me must be coming out in my old age. Cause I’ve been trying to figure out how I could sneak something like this into code just to see if I could give someone the willies. Maybe I could call it a test of our code review procedures.

perl -E 'my $c = "sadistopia"; print "OK\n" if($c =~ m msadism)'

Todd



More information about the Houston mailing list