Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: getting parts of the strings from a file into managable variables

by my_perl (Initiate)
on Nov 19, 2004 at 17:42 UTC ( [id://409077]=note: print w/replies, xml ) Need Help??


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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://409077]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-26 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found