Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: mysterious hash ref result

by Anonymous Monk
on Jan 12, 2007 at 13:45 UTC ( #594384=note: print w/replies, xml ) Need Help??


in reply to mysterious hash ref result

Consider the following
use Data::Dumper; sub nothing { return () } my %hash = ( state => 'db_user', usr_id => 1, edit_usr_id => nothing(), mode => 'add', ); warn Dumper\%hash; %hash = ( state => 'db_user', usr_id => 1, edit_usr_id => scalar nothing(), mode => 'add', ); warn Dumper\%hash; __DATA__ $VAR1 = { 'add' => undef, 'usr_id' => 1, 'edit_usr_id' => 'mode', 'state' => 'db_user' }; $VAR1 = { 'usr_id' => 1, 'mode' => 'add', 'edit_usr_id' => undef, 'state' => 'db_user' };

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2020-02-18 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (76 votes). Check out past polls.

    Notices?