fork download
  1. #!/usr/bin/perl
  2.  
  3. while ($input ne $answer) {
  4. print "Give me a cookie: ";
  5. my $input = <STDIN>;
  6. chomp($input);
  7. }
  8. if ($input = 'cookie') {
  9. print "Yum! \n"
  10. }
  11.  
Success #stdin #stdout 0s 4596KB
stdin
oi
stdout
Yum!