in reply to Strange grep construct
DB<8> x ["a",=>"b"] 0 ARRAY(0x54e32f0) 0 'a' 1 'b' DB<9> x ["a",,"b"] 0 ARRAY(0x54e2cd8) 0 'a' 1 'b'
Like choroba already explained it's a syntactic trick to avoid lc to be stringified by =>
so whats happening is a construction of hash pairs, where the keys are normalized to lowercase. The fat-comma is meant to clarify this pair nature.
DB<12> x map {lc,$_} "A".."C" 0 'a' 1 'A' 2 'b' 3 'B' 4 'c' 5 'C'
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|