[Chicago-talk] no strict refs question

Jay Strauss me at heyjay.com
Sun Mar 7 12:57:19 CST 2004


Thanks, 

Hash works better than I was doing anyway.

Jay
----- Original Message ----- 
From: "Paul Baker" <pbaker at where2getit.com>
To: "Chicago.pm chatter" <chicago-talk at mail.pm.org>
Sent: Sunday, March 07, 2004 12:25 PM
Subject: Re: [Chicago-talk] no strict refs question


> 
> 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
> 
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at mail.pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
> 
> 




More information about the Chicago-talk mailing list