[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] map grep



IRC rules!   :)

j


02:07 < jhannah> ick. what's the proper form of this?  map { /servers_(\d+)/; $1; } grep { /servers_/ }
02:14 < dngor> jhannah: map { substr($_, 8) } grep { /servers_/ } ... is one way
02:15 < dngor> jhannah: map { /servers_(\d+)/ ? $1 : () } ... is another
02:16 < jhannah> ooo empty () collapse... cool   :)