Tip: Google Code Search to find prior art for code syntax

markjugg on 2008-06-26T13:32:05

Sometimes I wonder if a bit uncommon syntax is valid, and if it is, if anyone actually uses it. For example, I don't see "my" on the right side of an assignment operator very often:

my $a = my $b;

I've started using Google Code Search to turn up prior art.

In this case, I quickly discovered that, Yes, that's valid, and people are actually using it.

Remember to include lang:perl to restrict a search to Perl.


Google vs. Krugle

ChrisDolan on 2008-06-27T06:10:13

Hmm, usually for searches like this I prefer krugle.org over Google, but in this case Google wins by a very wide margin. Krugle can't even find one instance of that syntax.