in reply to Why does "flush filehandle" work?
You hit upon an (older) corner of perl's OOP syntax, the "indirect object" notation. Since flush is a method what your first code really translates to would be $gp->flush (which would be the proper replacement if you want to be explicit). In recent perls you can als disable it with no feature q{indirect}. See https://www.effectiveperlprogramming.com/2020/06/turn-off-indirect-object-notation/ for a bit more detailed explanation.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why does "flush filehandle" work?
by ikegami (Patriarch) on Jan 29, 2025 at 14:28 UTC |