>>>>> "KW" == Kenneth Wolcott <[email protected]> writes:
KW> On Mon, Mar 22, 2010 at 15:50, Uri Guttman <[email protected]> wrote: >>>>>> "KW" == Kenneth Wolcott <[email protected]> writes: KW> >> select LOGNAME; KW> >> $|++; KW> >> select STDOUT; KW> KW> Which is what the Perl Cookbook suggests as well. you said this is what the cookbook said. KW> my $old_handle = select LOGNAME ; KW> $|++ ; KW> select $old_handle ; KW> Hmmm...copy&paste from the Safari online Perl Cookbook, 2nd ed: KW> $old_fh = select(OUTPUT_HANDLE); KW> $| = 1; KW> select($old_fh); then you say this is what it said. please make up your mind! :) KW> Looks pretty close to your code, but not the same. the difference in setting $| is irrelevent. that variable is special and can only be set to 1 or 0. and i used lexicals which is a useful change. uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
