[Haskell-cafe] Help converting Perl to Haskell