テストスクリプトで Use of uninitialized value の valuewarning を出しまくってみました。 #!/usr/bin/perl use strict; use warnings; my $str; # undifined string my %hash; # undifined hash # Use of uninitialized value in pattern match # Use of uninitialized value in substitution $str =~ /a/; $str =~ s/a/b/g; my $foo = 'hello'; $foo =~ s/hell/$str/; # Use of uninitialized value in string eq # (numeric eq, ==, lt, gt, ...) if
![Use of uninitialized value の傾向と対策 - bonar note](https://cdn-ak-scissors.b.st-hatena.com/image/square/06a15c64ba0ceec233d86d71001ebb29a9dcbf5d/height=288;version=1;width=512/https%3A%2F%2Fcdn.blog.st-hatena.com%2Fimages%2Ftheme%2Fog-image-1500.png)