in reply to Re^6: How to write testable command line script?
in thread How to write testable command line script?
my @answer = undef;
General note: I'm not sure what you intend by the quoted statement, but you should realize that it initializes the (newly created) array with a single element, the undef value, which in Perl is a well-defined value! (The @answer array thus created is also entirely and absolutely independent of any other array with the same name.)
c:\@Work\Perl\monks>perl -wMstrict -le "use Data::Dump qw(dd); ;; my @answer = undef; dd \@answer; " [undef]
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: How to write testable command line script?
by thechartist (Monk) on Nov 21, 2018 at 04:02 UTC |