I didn't know you could chain lexical declarations like that! The bug survived for months because $nine was 0 and $six was supposed to be an empty string. Playing around with it reveals more questionable behavior:my $one = 1; my $six = my $nine = 9; print $six; # prints 9
Does that look strict? :-)#!/usr/bin/perl -l use strict; use warnings; use diagnostics; print my $J = my $A = my $P = my $H = 'Just',' Another ','Perl',' Hacker';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: If 6 Was 9
by haukex (Archbishop) on Oct 15, 2018 at 19:29 UTC | |
by LanX (Saint) on Oct 15, 2018 at 19:46 UTC | |
|
Re: If 6 Was 9
by LanX (Saint) on Oct 15, 2018 at 18:16 UTC | |
by LanX (Saint) on Oct 15, 2018 at 23:21 UTC | |
|
Re: If 6 Was 9
by tybalt89 (Monsignor) on Oct 15, 2018 at 18:13 UTC | |
by stevieb (Canon) on Oct 15, 2018 at 18:21 UTC | |
|
Re: If 6 Was 9
by holli (Abbot) on Oct 17, 2018 at 00:53 UTC | |
|
Re: If 6 Was 9
by ikegami (Patriarch) on Dec 06, 2018 at 03:48 UTC | |
|
Re: If 6 Was 9
by jdporter (Paladin) on Dec 05, 2018 at 17:26 UTC |