>perl -wMstrict -le "package L; use vars qw(%lone); our %once; sub l { return print __PACKAGE__, qq{: @_} } package main; print 'do some stuff in ', __PACKAGE__; package L; use vars qw(%singular); our %onetime; package main; $L::once{x} ||= (L::l('hi from', __PACKAGE__), 1); $L::lone{x} ||= (L::l('hello from', __PACKAGE__), 1); $L::onetime{x} ||= (L::l('hiya from', __PACKAGE__), 1); $L::singular{x} ||= (L::l('greets from', __PACKAGE__), 1); $L::once{foo} ||= L::l('this should print'); $L::once{foo} ||= L::l('but this should NOT print!'); " do some stuff in main L: hi from main L: hello from main L: hiya from main L: greets from main L: this should print