in reply to Re^8: magic-diamond <> behavior -- WHAT?!
in thread magic-diamond <> behavior -- WHAT?!

Then fix the documentation! Changing Perl because documentation of applications is incorrect or incomplete isn't the way to go.
  • Comment on Re^9: magic-diamond <> behavior -- WHAT?!

Replies are listed 'Best First'.
Re^10: magic-diamond <> behavior -- WHAT?!
by zwon (Abbot) on Oct 28, 2009 at 20:00 UTC
    Then fix the documentation!

    I think I should fix the scripts. I don't think that's their intended behavior.

    Changing Perl because documentation of applications is incorrect or incomplete isn't the way to go.

    To be clear. I don't actually propose to make this change, I understand that this would broke a lot of things including quite healthy scripts which use something like already mentioned

    BEGIN {s!^(\s)!./$1!,s/^/</,s/$/\0/ for @ARGV}
    Just in disagreement with your position I think that
    • this feature is not so useful
    • it's weird and error prone
    • it's make easy things harder
      My point is that if you want to make "robust" scripts, that is, scripts that need to be run in a potentially untrustworthy environment, should either enable taint, or use 3-arg open. Preferably both.

      Robbing Perl of a feature (and potentially breaking code) just so one can take short cuts in untrustworthy environments isn't the right thing to do.