Skip to content

Instantly share code, notes, and snippets.

@yanick
Created February 2, 2015 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yanick/41cc0eda7c755926a7d7 to your computer and use it in GitHub Desktop.
Save yanick/41cc0eda7c755926a7d7 to your computer and use it in GitHub Desktop.
It's an arrayref, it's an hashref, it's a... hashrayref!
use strict;
use Data::Printer;
sub x { \@_ }
my %foo = 'a'..'d';
my $bar = x(%foo);
$foo{a} = "banana";
p $bar; p %foo;
$bar->[3] = "potato";
p $bar; p %foo;
$bar->[0] = 'different';
$bar->[1] = 'yet the same(ish)';
p $bar; p %foo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment