# slurp a bunch of files @files = { local(@ARGV, $/) = @filenames; <> }; # get the indexes of items in an array @foo{ @foo } = 0 .. @foo; $foo{'abc'} # the index of 'abc' in @foo # Get the sign of a number $a <=> 0 # test primality sub isPrime { (1 x $_[0]) !~ /^(11+)\1+$/ } # (ok I never use that in production code # but it is funny)