sub is_anagram { my %hash; map { $hash{ join '', sort split '' } ++ } @_; return 2 > keys %hash ? 'True' : 'False'; }
sub is_anagram { return qw( True False )[ eval join 'cmp', map "'$_'", map { join ' +', sort split '' } @_ ]; }
In reply to Re: Python tricks
by rsFalse
in thread Python tricks
by pme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |