[Boston.pm] catenation of undef with string, 2 cases

Mike Small <[email protected]>
Newsgroups gmane.comp.lang.perl.perl-mongers.boston
Message-ID <[email protected]>
#!/usr/pkg/bin/perl
use warnings;

my $a;
$a .= '70';
my $b;
$b = 42 . $b;
print "$a, $b\n";


With the script above I get an uninitialized value warning from perl
5.24 for the second concatenation but not the first. Is there a story
behind this? Something to do with the first case being something you'd
likely want to do without whinging from the interpreter?

- Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.