in reply to Newbie Question
This line is checking if the key $stuff[0] exists in the hash %nums.
$stuff[0] is the first element in the array @stuff.
Example:
This will print a is in %nums.my @stuff = qw/a b c d/; my %nums = ( a => 1, b => 2, c => 3, ); if (exists $nums{$stuff[0]}) { print "$stuff[0] is in \%nums"; ) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Newbie Question
by pgaraitonandia (Novice) on Feb 17, 2009 at 20:44 UTC |