Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Perl search by value from hash.

print grep { $host_ip{$_} eq "1.1.1.1"} keys %host_ip;

where:

%host_ip = (
"First" => "1.1.1.1",
"Second" => "2.2.2.2"
);



This post first appeared on Linux Command's, please read the originial post: here

Share the post

Perl search by value from hash.

×

Subscribe to Linux Command's

Get updates delivered right to your inbox!

Thank you for your subscription

×