How can you get an if
statement in another if
, for instance:
$line = <STDIN>;
if $line eq "\n") {
print "You did not type anything
} else {
print "You said: $line";
}
Could you put anotherif
next to the place where it says:
You said: blah
like this:
You said: blah, are you sure?(y/n)
and then the user must type y or n for the program to continue.