in reply to Perl oddities
- system returning true on failure, false on success. I know why it's doing that, I know where it's coming from (and that's why), but it still makes me gag each and every time I use it.
- open not returning a file handle, but modifying its first argument. There are other functions modifying their first argument (push and friends, 4-arg substr, chomp/chop), but you kind of expect those. open doing so seems to do it for no other reason of mimicing the underlaying C functionality.
- Perl has every important flow control keyword used by other important languages, and then some. But it doesn't have a (native) switch. Or rather, it still doesn't have one. While it was on the wishlist of perl 1.0.0.
- Ok, so Perl has this IO system that used to be a thin layer over your systems IO system, and now (with PerlIO) mimics it, but still looks the same. And while I can easily lock entire files, why can't I easily lock file regions on systems that support it?
Warn (wrongly) for one particular function, if you have exactly one space between the function name and the opening paren?perl -wce 'chomp ($_)' -e syntax OK perl -wce '$_ = log ($_)' -e syntax OK perl -wce 'print ($_)' print (...) interpreted as function at -e line 1. -e syntax OK perl -wce 'print ($_)' -e syntax OK
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl oddities
by TimToady (Parson) on Mar 01, 2005 at 18:51 UTC | |
Re^2: Perl oddities
by Tanktalus (Canon) on Mar 01, 2005 at 16:58 UTC | |
by Joost (Canon) on Mar 01, 2005 at 17:03 UTC | |
Re^2: Perl oddities
by Mugatu (Monk) on Mar 01, 2005 at 17:04 UTC | |
by QM (Parson) on Mar 01, 2005 at 23:55 UTC | |
by Anonymous Monk on Mar 02, 2005 at 13:09 UTC | |
Re^2: Perl oddities
by theorbtwo (Prior) on Mar 02, 2005 at 12:04 UTC |
In Section
Meditations