All pastes #966321 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-04-01 17:50 UTC
rendered paste body
#!/usr/bin/perl

use strict;
use diagnostics;
use warnings;

my $food = "ice cream";

print "This is a user input test.\n";
print "Please enter your text on the line below.\n";
print "Do you like $food?\n";
print "Input:";

my $line = <STDIN>;
if ($line eq "yes\n") {
  print "I like $food too!\n";
} else {
  print "Our tastes clearly differ.\n";
}