Re: Kindly explain special variable $|

2009-05-28 Thread Chas. Owens
On Thu, May 28, 2009 at 06:23, sanket vaidya wrote: snip > This code gave some vague picture in my mind about flushing. To summarize > > When we write some data, the data is not written (to terminal or file) > instantly, but is collected in buffer & is only written when the buffer is > full. Once

RE: Kindly explain special variable $|

2009-05-28 Thread sanket vaidya
>>-Original Message- > From: Thomas Bätzler [mailto:t.baetz...@bringe.com] > Sent: Thursday, May 28, 2009 11:57 AM > To: beginners@perl.org > Cc: sanket vaidya >Subject: AW: Kindly explain special variable $| > sanket vaidya asked: > It would be great if some

AW: Kindly explain special variable $|

2009-05-27 Thread Thomas Bätzler
sanket vaidya asked: > It would be great if some of you write a simple code which has two > different outputs for $| = 0 & $| = 1 to demonstrate the difference. Try this with different values for $| #!/usr/bin/perl -w use strict; $| = 1; for ( 1..20 ){ print "."; warn "!" unless $i % 5;

Kindly explain special variable $|

2009-05-27 Thread sanket vaidya
Hi, Perldoc for $| is as below: 1. If set to nonzero, forces a flush right away and after every write or print on the currently selected output channel. Default is 0 (regardless of whether the channel is really buffered by the system or not; $| tells you only whether you've asked Perl expli