in reply to why qw() rather than ()
qw/STRING/ is actually the same as split ' ', 'STRING'.#!perl -w use strict; use vars qw(@array); # same as: use vars '@array'; BEGIN { # the use vars below happens at compile time, # so @array must be set at compile time @array = ('$scalar', '%hash'); } use vars (@array); # $scalar and %hash are now declared $scalar = 7; %hash = (key => 'value');
|
|---|