smittypaddler has asked for the wisdom of the Perl Monks concerning the following question:
Produces this:#!/usr/bin/perl $array=undef; warn "array ",defined($array) ? 'is' : 'is not'," defined"; warn '$#{$array} is ',$#{$array}; warn "array ",defined($array) ? 'is' : 'is not'," defined";
array is not defined at /home/smitty/bat/t line 3. $#{$array} is -1 at /home/smitty/bat/t line 4. array is defined at /home/smitty/bat/t line 5.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using $# defines a variable?
by haukex (Archbishop) on May 18, 2019 at 21:27 UTC | |
by LanX (Saint) on May 18, 2019 at 22:14 UTC | |
|
Re: Using $# defines a variable?
by Athanasius (Archbishop) on May 19, 2019 at 03:33 UTC |