print $filehandle "Hello world"; is an everyday use of indirect object notation (same with say)
No it's not. print is not a method. This is not a method call, direct or indirect. print is an operator. Same goes for say, grep, map and sort. The lack of comma after their first operand does not make these method calls.
There is no flush operator, though. flush $filehandle is truly a method call (even though the handle might not be an object). To use flush, IO::Handle or IO::File (depending on the version of Perl) first needs to be loaded to provide the method (although newer version of Perl automatically load IO::File when needed).
In reply to Re^2: Why does "flush filehandle" work? (indirect object)
by ikegami
in thread Why does "flush filehandle" work?
by chengiz5
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |