Anarion has asked for the wisdom of the Perl Monks concerning the following question:
Definedperl -le 'use strict;my @a=("a");@a=();print "Defined" if defined @a;p +rint scalar @a'
Definedperl -le 'use strict;my @a=("a");undef @a;print "Defined" if defined @ +a;print scalar @a'
Definedperl -le 'use strict;my @a=("a");@a=undef;print "Defined" if defined @ +a;print scalar @a'
Edit Masem - CODE tags
s==q^QBY_^=,$_^=$[x7,print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using undef on a array
by tachyon (Chancellor) on Oct 31, 2001 at 15:09 UTC | |
by tye (Sage) on Oct 31, 2001 at 20:22 UTC | |
|
Re: using undef on a array
by davis (Vicar) on Oct 31, 2001 at 14:30 UTC | |
|
Re: using undef on a array
by blakem (Monsignor) on Oct 31, 2001 at 14:33 UTC | |
by Biker (Priest) on Oct 31, 2001 at 14:41 UTC | |
|
Re: using undef on a array
by davorg (Chancellor) on Oct 31, 2001 at 14:40 UTC | |
|
Re: using undef on a array
by ajt (Prior) on Oct 31, 2001 at 14:42 UTC | |
by Anarion (Hermit) on Oct 31, 2001 at 15:00 UTC | |
|
Re: using undef on a array
by wog (Curate) on Nov 01, 2001 at 01:10 UTC |