in reply to your Perl bug Achilles heel

For me the main recurring problem is dealing with encodings. I use a few tools that stick to old-fashioned ISO-8859-1, but do most of my processing in utf-8. So I am already in trouble. Then the "silently downgrade anything that looks like it could be ISO-8859-1" policy that perl had to adopt for backward compatibility purposes adds to that. Especially since perl 5.10 took out the -CSD option. It makes it annoying to write quick one-off filters that work with STDIN/STDOUT.

BTW I agree that the map problem is annoying, especially as it looks inelegant. You end up with parentheses, but no comma between the "arguments". It just doesn't look right. I have learned to get over it though, after years of writing lines like: print "foo ", join( ', ', map( { "$_: $h{$_}" } sort keys %h)), "\n";.

Replies are listed 'Best First'.
Re^2: your Perl bug Achilles heel
by Anonymous Monk on Dec 05, 2008 at 11:10 UTC
    perl -Mopen=:utf8,:std    ...?

      If you mean the other wau around (perl -Mopen=:std,:utf8 -E''), indeed that works. Thanks

      Overall it's still a pain though. At least for my brain! One-liners and scripts that don't work the same (you CAN use -CSD from the command line) mess me up.