Re: local and auto flush

2018-05-15 Thread Andy Bach
> I vaguely understand that local restricts the auto flushing, though I’m not sure how. Does local go out of scope when the TT is called? More broadly, do I actually need local? Do I actually need auto flushing? It basically creates a "local" copy of the global var - local meaning the current lexi

Re: local and auto flush

2018-05-15 Thread Andrew Solomon
Hi Rick, Regarding "local": $| is a global* variable so you use local to isolate this change to only where you need it. To see what I mean, run this: print "step1: $| \n"; { local $| = 1; print "step2: $| \n"; } print "step3: $| \n"; and you'll get output: step1: 0 step2: 1 st

local and auto flush

2018-05-15 Thread Rick T
I’m very much a novice — familiar with Learning Perl but finding Intermediate Perl an uphill slog. The few lines below are from a subroutine that calls Template Toolkit. The commented out line I simply copied from Perl Template Toolkit (PTT); the line after it is what I replaced it with after