Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why won't this code work?
#1
Below is my code, basically if the answer is "Y" then the script runs a message if it's something else then it closes.

Quote:#! usr/bin/perl
print "Do you wish to run Program? [Y/N]:";
$answer = <>;
if($answer == "Y") {
print "COOOL\n";
} else {
system "exit"
}
Reply


Messages In This Thread
Why won't this code work? - by HeyDev - 08-10-2011, 12:58 AM
RE: Why won't this code work? - by AceInfinity - 08-22-2011, 10:17 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)