Last active
August 29, 2015 14:07
-
-
Save SebDeclercq/ad3aa1e514a493e4689d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/perl -w | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use experimental 'postderef'; | |
use Data::Dumper; | |
my $ref = [ { 'az' => 'er', 'ty' => 'uiop', }, | |
[ 1..12 ], | |
'Hello World', | |
{ 'bz' => [ 'a'..'g' ], 'cv' => { 'azerty' => 'uiop' }, }, | |
'Test', | |
[ qw/foo bar baz/ ], | |
]; | |
say "OLD\t", join $", @{%{@$ref[3]}{bz}}; | |
say "NEW\t", join $", $$ref[3]{bz}->@*; | |
say "OLD\t", $_.' => '.%{@$ref[0]}{$_} for sort keys %{@$ref[0]}; | |
say "NEW\t", $_.' => '.$$ref[0]{$_} for sort keys $$ref[0]->%*; | |
say "OLD\t", join $", @{$$ref[5]}; | |
say "NEW\t", join $", $$ref[5]->@*; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment