in reply to A bit more clarity on uninitialized value in string ne
The output is "Use of uninitialized value in print at script.pl line 5.". That is because $var is first set to "111" and then to undef afterwards. Likely it is that what happens in your script, e.g. a subroutine you call can return undef.#!perl -w use strict; my $var = "111"; $var = undef; print $var;
|
|---|