[ create a new paste ] login | about

Link: http://codepad.org/qU42rcMo    [ raw code | output | fork ]

sironekotoro - Perl, pasted on Sep 23:
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env perl
use strict;
use warnings;
my $answer = 'perl';

my $var = <STDIN>;
chomp $var;

if ($var eq $answer){
    print "good\n";
}else{
    print "NG\n";
}


Output:
1
2
3
Use of uninitialized value in scalar chomp at t.pl line 7.
Use of uninitialized value in string eq at t.pl line 9.
NG


Create a new paste based on this one


Comments: