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

2016-11-09 Thread Mike Small
Conor Walsh writes: > I thought Perl 6 was supposed to fix the DWIM bug. IIRC, I read the other day it narrows it so that only an assignment to a data structure element autovivifies but an attempted access does not. That would eliminate some do what I don't mean cases, eh? --

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

2016-11-09 Thread Conor Walsh
I thought Perl 6 was supposed to fix the DWIM bug. On Wed, Nov 9, 2016 at 3:38 PM, Bill Ricker wrote: > On Wed, Nov 9, 2016 at 3:24 PM, Mike Small wrote: >> I have trouble >> remembering the handy special cases but when it's somewhat systematic >> that

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

2016-11-09 Thread Uri Guttman
On 11/09/2016 03:24 PM, Mike Small wrote: Uri Guttman writes: On 11/09/2016 02:04 PM, Bill Ricker wrote: I think Uri and Ricky have it nailed. You can wrap with do{ no warnings; ... } or protect the concatenation with 42 . ($b//q()); or equivalent ?: or or use $b .=

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

2016-11-09 Thread Mike Small
Uri Guttman writes: > On 11/09/2016 02:04 PM, Bill Ricker wrote: >> I think Uri and Ricky have it nailed. >> >> You can >> wrap with do{ no warnings; ... } or >> protect the concatenation with 42 . ($b//q()); or equivalent ?: or or >> use $b .= 42 ; if order doesn't

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

2016-11-09 Thread Uri Guttman
On 11/09/2016 02:04 PM, Bill Ricker wrote: I think Uri and Ricky have it nailed. You can wrap with do{ no warnings; ... } or protect the concatenation with 42 . ($b//q()); or equivalent ?: or or use $b .= 42 ; if order doesn't matter (it usually does, though) or initialized $b to '' instead

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

2016-11-09 Thread Bill Ricker
I think Uri and Ricky have it nailed. You can wrap with do{ no warnings; ... } or protect the concatenation with 42 . ($b//q()); or equivalent ?: or or use $b .= 42 ; if order doesn't matter (it usually does, though) or initialized $b to '' instead of undef, knowing it will be concatenated

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

2016-11-09 Thread Uri Guttman
On 11/09/2016 01:40 PM, Morse, Richard E.,MGH wrote: On Nov 9, 2016, at 12:49 PM, Mike Small wrote: #!/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

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

2016-11-09 Thread Morse, Richard E.,MGH
> On Nov 9, 2016, at 12:49 PM, Mike Small wrote: > > > #!/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

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

2016-11-09 Thread Mike Small
#!/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