I am using EPIC too. But when I open the *.pm file with utf-8 , eclipse always 
show out of system
virtual memory error,and then I have to shut down the eclipse. who can tell me 
why?

-----Original Message-----
From: Chris Share [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 19, 2006 7:54 AM
To: beginners@perl.org
Subject: More Info About $| = 1;


Hi,

I'm a C programmer teaching myself Perl. I'm working on Windows XP using
ActivePerl and Eclipse (EPIC).

I've got a question about $| = 1;

If I run the following program:

#!/usr/local/bin/perl

use strict;
use warnings;

print "What is your name? ";
my $name = <STDIN>;
chomp $name;
print "Hello, $name!\n";

the command line does nothing until I enter some text, at which point
the program runs and outputs the following:

Test
What is your name? Hello, Test!

What I don't get is why the print statement doesn't execute?

If I add $| = 1; at the top of the program this fixes the problem and
the program runs as expected.

Could someone explain what's going on here, or point me to an explanation.

Cheers,

Chris


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to