Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

bigmacbear's scratchpad

by bigmacbear (Monk)
on May 01, 2006 at 21:58 UTC ( [id://546780]=scratchpad: print w/replies, xml ) Need Help??

The following is my personal LiveJournal and as such has little if any Perl content, but I link it here precisely to demonstrate how easy it is to do: bigmacbear. I keep my publically accessible stuff clean but friends-only stuff may not be safe for work.


Wondering why this construct returns as many empty elements as are present in the argument of keys(), instead of nothing, when %found and %good are identical:

@bogus = map { $_ if !defined $good{$_}; } keys %found; @missing = map { $_ if !defined $found{$_}; } keys %good;

Answer: use grep instead of map. per merlyn and ysth, grep selects and map transforms.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-04-24 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found