Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: using hash to compare with string and print the string

by thanos1983 (Parson)
on May 16, 2019 at 08:59 UTC ( [id://11100053]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @keys = qw(b d a c);
    my @values = qw(200 100 30 40);
    ...
    my %hash;
    @hash{@keys} = @values;
    print Dumper \%hash;
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    array element: d = 100 inside %hash
    array element: a = 30 inside %hash
    array element: c = 40 inside %hash
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found