in reply to Re: getting parts of the strings from a file into managable variables
in thread Help:getting parts of the strings from a file into managable variables

Hi, how would i access these variables?
foreach userid i would like to print only var1 , its value, and var2 , its value.
foreach $key (keys %uservariables) {
???????
}
THanks
  • Comment on Re^2: getting parts of the strings from a file into managable variables

Replies are listed 'Best First'.
Re^3: getting parts of the strings from a file into managable variables
by Eimi Metamorphoumai (Deacon) on Nov 19, 2004 at 17:54 UTC
    Something like
    for my $key (keys %uservariables){ print "User $key has var1: $uservariables{$key}->{var1}, var2: $user +variables{$key}->{var2}"; }
      Thanks a bunch
      what if var2, var3 shows up few times for single userID
      and i would like just first occurence of var2 and last
      occurence of var3.
      Thanks :)