Skip to content

Instantly share code, notes, and snippets.

@dealforest
Created October 1, 2009 16:47
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 dealforest/199093 to your computer and use it in GitHub Desktop.
Save dealforest/199093 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use JSON::Syck;
use Data::Dumper;
my $a = { hoge => 'fuga' };
my $b = { foo => $a, bar => $a };
warn Dumper $b;
warn JSON::Syck::Dump($b);
my $c = { a => { aa => 1 }, b => 2, c => 3 };
$c->{d} = $c->{a};
warn Dumper $c;
warn JSON::Syck::Dump($c);
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment