Your skill will accomplishwhat the force of many cannot PerlMonks

### Comment on

 Need Help??

This is the first program I made. It's relatively simple but it helped me understand the basics.

```use warnings;
use strict;

my \$name = <STDIN>;
chomp \$name;
print "Hello, \$name:)\n";

print "How old are you? ";
my \$age = <STDIN>;
chomp \$age;
print "You are \$age years old!\n";
\$age = \$age / 2;
print "Half your age is \$age years.\n";
my \$sum;

{
print "Enter a number... ";
\$sum = <STDIN>;
chomp \$sum;
if (! isNumber (\$sum))
{
redo;
}
else
{
last;
}
}

my \$nextsum = \$sum / 2;
print "Half of \$sum = \$nextsum";
sub isNumber
{
my \$value = shift;
return \$value =~ /^[.\d+-eE]+\$/;
};
print "\nTell me \$name, would you like to try a test? Yes or No.\n";

{

{
print "Oh well, have a good day!";
exit;
}

{
redo;
}
}

print "The question is: What is the square root of 36?\n";
print "Correct! Have a good day!" if "6" eq lc (\$answertwo);

print "Sorry, you're wrong. Have a good day!" if "6" ne lc (\$answertwo
+);

As you can see, it goes like this:

```What is your name?your name
How old are you? 34
You are 34 years old!
Half your age is 17 years.
Enter a number... 5
Half of 5 = 2.5
Tell me your name, would you like to try a test? Yes or No.
yes
The question is: What is the square root of 36?
seven
Sorry, you're wrong. Have a good day!

In reply to Re^2: Teaching Children How to Program by Panda
in thread Teaching Children How to Program by Sandy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

• Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
• Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
• Read Where should I post X? if you're not absolutely sure you're posting in the right place.
• Posts may use any of the Perl Monks Approved HTML tags:
a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
• You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
 For: Use: & & < < > > [ [ ] ]
• Link using PerlMonks shortcuts! What shortcuts can I use for linking?

Create A New User
Chatterbox?
 [stevieb]: "Happy Monk Day, you've been here 8 troublesome years". Tack on another 8 before I signed up :)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-08-19 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Who is your favorite scientist and why?

Results (311 votes). Check out past polls.

Notices?