Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: hash problems

by changma_ha (Sexton)
on Sep 21, 2010 at 06:25 UTC ( #861005=note: print w/replies, xml ) Need Help??


in reply to hash problems

Hi Weglarz . Hope the following code will help

#! /usr/bin/perl use strict; use warnings; use Data::Dumper; my %passwords = ("Matt", "s1k1d52", "scuzzy", "2ab928", "Marky", "s829 +1s", "Jeb", "jeb23"); delete $passwords{"jeb"}; if(exists $passwords{Matt}){ print($passwords{Matt}. "is my password.\n"); } if(defined $passwords{scuzzy}){ print($passwords{scuzzy} . " IS defined!\n"); }else{ print("%passwords are everyone's passwords!\n"); }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2022-08-11 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?