Perl's lack of 'in' keyword

Andy Armstrong andy at hexten.net
Thu Oct 9 11:51:11 BST 2008


On 9 Oct 2008, at 01:39, Iain Barnett wrote:
> if $a ~~ $b	#this could mean several things

A smart match between two scalars. Clear.

> if $a in $b		#it is clear what this means

One scalar is in another? WTF?

> if a in b		#this is even better IMO


Dunno what a and b are - so who knows what it does?

Which is not, of course, to say that you're wrong - but that  
readability is - to some extent - in the eye of the beholder.

-- 
Andy Armstrong, Hexten





More information about the london.pm mailing list