Check this out:
#!/usr/bin/perl use strict; use warnings; use Devel::Peek qw( Dump ); while (my $data = <DATA>) { chomp $data; print Dump( $data ); if ($data == 2){print "->got 2\n"} } print "Enter a 2\n"; my $input = <>; print Dump( $input ); if ($input == 2){print "->got 2\n"} __DATA__ 1 2 3 4
-derby
In reply to Re: Whatever happened to chomp?
by derby
in thread Whatever happened to chomp?
by zentara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |