> > > What is the best way to define a global value like $query if I want to
> > > 'use strict'. I really don't want to be passing $query to all my
> > > subroutines. I could package define it as $main::query but that seems
> > > awkward.
> "perldoc perlref" addresses the nested subroutine problem, and
> suggests using something like this:
>
> local *printQueryParams = sub {
>
> instead of this:
>
> sub printQueryParams {
>
> The assignment to the typeglob is pretty slick in that it let's you
> call the anonymous subroutine as if it were a subroutine named
> printQueryParams.
How about just:
use vars qw ( $query );
to define a package global?
--
-- Tom Mornini
-- InfoMania Printing and Prepress