Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Please Help

by Generoso (Parson)
on Sep 30, 2012 at 02:53 UTC ( #996452=note: print w/ replies, xml ) Need Help??


in reply to Please Help

After all the explaining above here is how you script should look like.

#!/usr/bin/perl use strict; use warnings; $| =1; print 'What is your name: '; my $reply = <>; chomp($reply); print $reply; print "\nHi $reply \n"; print "$reply, please enter your income tax:" ; my $var = <>; if ($var < 5000) { print "no tax"; } elsif ($var > 5000 && $var < 30000) { print "the tax rate is 10%"; } elsif ($var > 30000) { print "the tax rate is 20%"; } print "\n";


Comment on Re^2: Please Help
Download Code
Replies are listed 'Best First'.
Re^3: Please Help
by cpom1 (Initiate) on Sep 30, 2012 at 20:27 UTC
    Thank all of you for your help. You guys have helped a great deal. And I have definitely bookmarked this site along with perldoc.perl.org :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2015-07-29 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls