Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Can't grab $ARGV[n]

by Crian (Curate)
on Mar 05, 2004 at 13:13 UTC ( [id://334207]=note: print w/replies, xml ) Need Help??


in reply to Can't grab $ARGV[n]

There are so much good points shown by other monks, but I have an other tip for you:

instead of

my $pi=3.141592654;

you could use

use constant PI => 3.141592654;

(in case you don't want to change PI in your program ;) )

Update: And you could use
print << 'END', "-" x76, "\n"; Welcome to Will's Plane Geometry Calculator. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The first argument should be tri, cir, rec, or sqr. The second argument should be area, peri, or hypo. If you give hypo as the second argument, the next two arguments should be the known sides of the traingle. The peri arg will also find circumference if cir is given for the figure. Specify the diameter to find this. Pi is approximated at 3.141592654 (simply change my pi if a different approximation is needed). To find area of a circle specify the radius. I think you can figure out the rest. END


That is much clearer to read for me.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://334207]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2024-03-28 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found