in reply to Re^3: A curious case of of my()
in thread A curious case of of my()

I did of course test my assertions before presenting them.
Care to post the test that showed @array is a global variable?
If the array were lexical it would not persist between calls to the subroutine.
That's not the definition of a lexical variable.
All of your points are in fact incorrect
Please show some code that proves my @array if EXPR; generates a global variable. Or how enabling strict and warnings would have pointed out the problem to the OP.

Replies are listed 'Best First'.
Re^5: A curious case of of my()
by anonymized user 468275 (Curate) on Apr 05, 2011 at 11:52 UTC
    It's the line "push @array ..." that auto-vivified the global array in the absence of strict declarations - the my did not take effect.

    One world, one people

      Bullshit.

      Please provide use with a code sample, that

      1. Shows that such an array is visible outside the lexical scope it's declared in.
      2. Shows that slapping use strict; on it actually makes a difference.