[ create a new paste ] login | about

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

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

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

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

print my $sum = $foo + $bar;


Output:
1
2
3
4
5
Use of uninitialized value in scalar chomp at t.pl line 6.
Use of uninitialized value in scalar chomp at t.pl line 9.
Use of uninitialized value in addition (+) at t.pl line 11.
Use of uninitialized value in addition (+) at t.pl line 11.
0


Create a new paste based on this one


Comments: