in reply to Re: The weirdest thing....
in thread The weirdest thing....
That means that:
Will turn on buffering even if it was off before calling the subroutine.# INCORRECT sub something { $|++; # do something without buffering $|--; }
Usually that's not really a problem, but if you need to revert autoflush to its previous setting, you have to remember its status yourself:
#CORRECT sub something { my $flush = $|++; # do something without buffering $| = $flush; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: The weirdest thing....
by jdporter (Paladin) on May 09, 2007 at 21:36 UTC | |
by Joost (Canon) on May 09, 2007 at 21:38 UTC | |
Re^3: The weirdest thing....
by former33t (Scribe) on May 10, 2007 at 19:25 UTC | |
Re^3: The weirdest thing....
by ikegami (Patriarch) on May 12, 2007 at 16:15 UTC |