http://qs321.pair.com?node_id=11125357


in reply to Qualified package variable access

Thanks Brother Rolf. 'our' is the fix. I've been using Perl on and off for 20 odd years and that's the first time I've used 'our' as far as I recall. My very well thumbed O'Reilly camel book (2nd edition 1996!) doesn't actually mention it!

Replies are listed 'Best First'.
Re^2: Qualified package variable access
by haukex (Archbishop) on Dec 17, 2020 at 18:47 UTC
    that's the first time I've used 'our' as far as I recall. My very well thumbed O'Reilly camel book (2nd edition 1996!) doesn't actually mention it!

    our was added in Perl 5.6, released in March 2000. Before that, one of the ways "predeclare" package variables was the vars pragma. You might be interested in the 4th edition Camel, or Modern Perl.