From: "Oleg V. Volkov" <[EMAIL PROTECTED]> > Greetings. > > Is there a way to do something to effect of: > our ${$varname}; > > I'm using a simple Getopt::* / Alias::attr like function to parse > named parameters from hash and assign them to localized variables to > save me some dereferencing inside heavy loops, but declaring > parameters two times - first as "our" variables and then once again as > a list for this function to check against, so it can catch errors in > list looks kinda ineffective to me.
Have a look at use vars qw($list @of %variables); You should be able to do something like our @allowed_list; use vars map '$'.$_, (@allowed_list = qw(foo bar baz)); load_data( $source, [EMAIL PROTECTED]; I don't think you can emulate 'local' or 'my'. You should also be aware of the different scoping of the 'our' and 'use vars' declarations. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>