in reply to Re^3: curly braces around a lexical file handle
in thread curly braces around a lexical file handle

Well, it's new syntax, so it's no surprise you need to learn somthing about it.

It becomes clearer if you think more about: A method call (and $a.print: $b is a method call) can have one invocant, but many ordinary arguments. Which one is special, the invocant or the first, ordinary argument?

When you see

$a.print: $b, $c, $d, $d;

Do you still think that $a is printed to file handle $b? Or to all of the arguments, all treated as file handles?

That would be a very bad huffman coding...

Replies are listed 'Best First'.
Re^5: curly braces around a lexical file handle
by ikegami (Patriarch) on May 31, 2010 at 17:00 UTC

    That would be a very bad huffman coding...

    Only if you think $o.print: $fh; precludes $fh.print: $o; from existing. There's no reason both can't exist. That said, I would call the former "dump" rather than "print".

    $o.dump; $o.dump: $fh;