1) how can i save a "command" i wrote in Perl
2) if i messed up in a previous line, after i hit enter, how do i go back up to it to fix it?
3) why does the following loop?...it keeps displaying "Hello fred!Welcome" over non-stop...why
print "name? ";
$a = <STDIN>;
chop $a;
while ($a ne "fred")
{
print "sorry. Again? ";
$a = <STDIN>;
chop $a;
}
while ($a == "fred")
{
print "Hello, fred!\n";
print "welcome!";
}
thanks
2) if i messed up in a previous line, after i hit enter, how do i go back up to it to fix it?
3) why does the following loop?...it keeps displaying "Hello fred!Welcome" over non-stop...why
print "name? ";
$a = <STDIN>;
chop $a;
while ($a ne "fred")
{
print "sorry. Again? ";
$a = <STDIN>;
chop $a;
}
while ($a == "fred")
{
print "Hello, fred!\n";
print "welcome!";
}
thanks