2010/7/24 Mike Martin <redt...@gmail.com>:

>>
>
> This is how I worked round the issue (didn't think of hash slice)
>
> foreach my $w (qw/$file_start $file_time $video_track $audio_track
> $quality $sync $sync_box $qual_box $vid_box $aud_box $time_label
> $times $file_hbox/) #Use qw to turn variable name into a string
>
> {
> my $key=  $w;
> my $value=$w;# assign $w to value and key
> $key=~s/^\$//; # remove $ sign from key
> $value=eval('\\'.$value); # turn variable name into a reference
> pointing to original variable
>
> $gui_hash{$key}=$$value ; create hash with and dereferenced value as value
> }
>

Mike,

Please post the question to the list, not just to me, that will help
you get better helps.

-- 
Jeff Pang
http://home.arcor.de/pangj/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to