[Chicago-talk] no strict refs question

Paul Baker pbaker at where2getit.com
Sun Mar 7 12:25:34 CST 2004


On Mar 7, 2004, at 11:38 AM, Jay Strauss wrote:

> $app = "filename";
> my @a = qw/app/;
>
> foreach my $var (@a) {
>  print "$$var\n";

Why not just use a hash?

my %vars = ( app => 'filename' );
my @a = qw/app/.

foreach my $var (@a) {
   print "$vars{$var}\n";
}

-- 
Paul Baker

"Reality is that which, when you stop believing in it, doesn't go away."
          -- Philip K. Dick

GPG Key: http://homepage.mac.com/pauljbaker/public.asc




More information about the Chicago-talk mailing list