Hi,
In the output of the following code there's a carriage return between
the $name variable and the !. Where is this coming from? Doesn't the
chomp get rid of this?
#!/usr/local/bin/perl
$| = 1;
use strict;
use warnings;
use CGI qw(:standard);
print What is your name? ;
my $name =
peng
!
/title
/headbody bgcolor=#cc text=#99h2Hello, peng
!/h2
/body/html
-Original Message-
From: Chris Share [mailto:[EMAIL PROTECTED]
Sent: Friday, October 20, 2006 6:54 PM
To: beginners
I'm trying to implement the following code:
##
require LWP::UserAgent;
my $ua = LWP::UserAgent-new;
$ua-timeout(10);
$ua-env_proxy;
my $response = $ua-get('http://search.cpan.org/');
if ($response-is_success) {
print
Thanks for the info. Isn't this what the Perl Package Manager is for?
Rob Dixon wrote:
Chris Share wrote:
I'm trying to implement the following code:
##
require LWP::UserAgent;
my $ua = LWP::UserAgent-new;
$ua-timeout(10);
$ua
Thanks to all who responded.
The Suffering from Buffering? article explains everything.
Cheers,
Chris
Derek B. Smith wrote:
--- Derek B. Smith [EMAIL PROTECTED]
wrote:
-- Andreas Puerzer [EMAIL PROTECTED] wrote:
Tom Phoenix schrieb:
On 10/18/06, Chris Share [EMAIL PROTECTED]
wrote
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