Skip to content

Instantly share code, notes, and snippets.

@pokutuna
Created September 25, 2012 07:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pokutuna/3780431 to your computer and use it in GitHub Desktop.
Save pokutuna/3780431 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use feature 'say';
use JSON::PP qw(encode_json);
my $hash = {
num => 1
};
say encode_json($hash); # => {"num":1}
say "$hash->{num}"; # => 1
say encode_json($hash); # => {"num":"1"}
@pokutuna
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment