> Kevin der Kinderen <[EMAIL PROTECTED]> said:
> Thanks for the comments Smoot.
>
> I thought "while (<>) {...}" was the same as "foreach (<>) {...}". Is this
> because foreach provides a list context to the file being read and while
> provides scalar context? I read this in the camel book but
Thanks for the comments Smoot.
I thought "while (<>) {...}" was the same as "foreach (<>) {...}". Is this
because foreach provides a list context to the file being read and while
provides scalar context? I read this in the camel book but didn't understand
the significance. It makes a difference
> Kevin der Kinderen <[EMAIL PROTECTED]> said:
>
> Question: What is the proper way to include a version number in the
> code? When I do a "perl -MCPAN -eshell" and type "r" for the reinstall
> recommendations - many modules show the version. Looking at the code to
> some of these modules it see
I'd appreciate any comments on the code below. I run it like this:
./live new("icmp");
foreach (<>)
{
chomp;
if ($_ eq "") {
print STDERR "\nDone\n";
exit(0);
}
print "$_ is ";
print "NOT " unless $p->ping($_, 2);