Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > values

Reply
Thread Tools

values

 
 
asit
Guest
Posts: n/a
 
      10-03-2008
$player = "Sharapova";

%player_country = (
Venus => "USA",
Sharapova => "Russia",
Serena => "USA",
);
print "$player represents : ";
print $player_country{"$player"};
print "\n";

@players = keys %player_country;
@values = values %player_country;

print "@players[0..$#players]\n";
print "@values[0..$#values]\n";

in the above program @values array holds all the values in the hash.
again values is a keyword used to retrieve values from hashes. how the
perl interpreter handles it ???
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      10-03-2008
asit <> wrote:
>in the above program @values array holds all the values in the hash.
>again values is a keyword used to retrieve values from hashes. how the
>perl interpreter handles it ???


Trivial: different name spaces.
%values, @values, $values, values() can easily separeted by the sigil
resp. where/how they are used in an expression.

jue
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not open Design view. Quote values differently in a '<%..."values"...%>' block. Rob Meade ASP .Net 2 08-10-2004 12:46 PM
Can you persist table cell values like you do with form field values? Richard Dixson ASP .Net 2 05-18-2004 01:11 PM
Can you persist table cell values like you can do with form field values? Richard Dixson ASP .Net 1 05-18-2004 03:47 AM
Comparing values in 2 textfiles and returning the missing values Jorgen Gustafsson Perl 4 12-12-2003 09:09 AM
Re: Config values or Application values - which is better/faster? S. Justin Gengo ASP .Net 2 08-20-2003 04:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57