On Wednesday, Oct 29, 2003, at 08:28 US/Pacific, Rick Triplett wrote:
#!/usr/bin/perl -w
print "Enter the radius: \n"; chomp ($radius = <STDIN>); $area = $radius*$radius*3.14
------------------------------^
normally that would need to have a ";" to close it out.
if ( $radius <= 0 ) { print "The area is zero\n"; } else { print "The area is $area\n"; }
You might want to also
a. "use strict" b. hence declare your variables c. make sure that $radius is numeric with some form of
die "must be numeric!\n" unless ( $radius =~ /^\d+$/);
etc, etc, etc...
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]