in reply to Re: basic openssh connectivity
in thread basic openssh connectivity

> I don't understand where this array is found

It's a global array, because we have $1, $2, $3, and $10 as well; and it exist as a *10 glob with all the possible slots, array being one of them.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^3: basic openssh connectivity
by 1nickt (Canon) on Jul 26, 2019 at 13:45 UTC

    Thanks choroba I figured it was a global, but didn't think that it would have been defined since no regexp match was attempted. I would have expected to get an error when Perl tried to interpolate it as it was not defined.


    The way forward always starts with a minimal test.
      An array can't be "not defined", it's just empty.
      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

        Yes. What I meant was that I did not expect the scalar $10 to have been defined and thus that the array would not exist.

        $ perl -Mstrict -E 'say $10 ? 1 : 0; say "foo@10bar"' 0 foobar


        The way forward always starts with a minimal test.