Compare values - examples
When reading from STDIN you can always expect a string
examples/scalars/is_empty_string.pl
#!/usr/bin/perl use strict; use warnings; my $input = <STDIN>; chomp $input; if ($input == "") { # wrong! use eq # empty string }
When reading from STDIN you can always expect a string
#!/usr/bin/perl use strict; use warnings; my $input = <STDIN>; chomp $input; if ($input == "") { # wrong! use eq # empty string }