Re: Get variable name from a list

2010-07-25 Thread C.DeRykus
> ... > 2010/7/24 Mike Martin : > > 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 int

Re: Get variable name from a list

2010-07-24 Thread Jeff Pang
2010/7/24 Mike Martin : >> > > 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 stri

Re: Get variable name from a list

2010-07-24 Thread Uri Guttman
> "JP" == Jeff Pang writes: JP> 2010/7/24 Mike Martin : >> Is this possible? >> >> I am trying to populate a hash with keys as variable name and value as >> variable value eg: >> my %hash; >> foreach my $w ($filename,$file_start,$file_time,$video_track,$audio_track,$quality,$s

Re: Get variable name from a list

2010-07-24 Thread Jeff Pang
2010/7/24 Mike Martin : > Is this possible? > > I am trying to populate a hash with keys as variable name and value as > variable value eg: > my %hash; > foreach my $w > ($filename,$file_start,$file_time,$video_track,$audio_track,$quality,$sync){ > my $hash{$key}=  $w; > That would be a hash slic