Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Putting an array into a hash gives an unexpected reference to the hash itself.

by choroba (Chancellor)
on Nov 08, 2012 at 15:38 UTC ( #1002929=note: print w/replies, xml ) Need Help??


in reply to Re: Putting an array into a hash gives an unexpected reference to the hash itself.
in thread Putting an array into a hash gives an unexpected reference to the hash itself.

I doubt Data::Dumper inspects any variable names. It just uses what you give it - or VAR1, VAR2 if it gets nothing.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
  • Comment on Re^2: Putting an array into a hash gives an unexpected reference to the hash itself.

Replies are listed 'Best First'.
Re^3: Putting an array into a hash gives an unexpected reference to the hash itself.
by AnomalousMonk (Chancellor) on Nov 08, 2012 at 19:49 UTC
    I doubt Data::Dumper inspects any variable names.

    It doesn't (as far as I know), and my code example would have been clearer had I not supplied a variable name to  Dump() in contrast to the OP. I just wanted to make the points that  Data::Dumper tries to emphasize repeated references within the data structure it's dumping (as these are usually important), and that even if one could sometimes recover the name of a reference, it probably wouldn't be worth doing.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002929]
help
Chatterbox?
[Cosmic37]: should I slurp? should I grep? Noble Lords I wish you good karma and beg your advice
[Corion]: Cosmic37: Ah, see perlfaq4, about How do I compute the intersection of two arrays
[Cosmic37]: I am out of practice; I use Perl for scientific programming for number crunching
[Corion]: Cosmic37: Basically, you read one file into a hash, keyed by your key, and then match the lines from the second file to that hash
[Cosmic37]: note that the two files only have datetimes which may match whereas other data per line is different format in file1 and file2 - is that really intersection?
[jedikaiti]: Hi Monks
[Corion]: Cosmic37: Well, if you want to use only parts of a line for the key, see split or whatever other mechanism to extract the key from the line
[Corion]: Hi jedikaiti!
[Cosmic37]: is there a webpage for full CB for this chat rather than side panel chat?
[Cosmic37]: thank you for advice

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-06-29 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (672 votes). Check out past polls.