new file: perl6.mdwn
authorPhilip Durbin <philipdurbin@gmail.com>
Wed, 1 Aug 2012 13:29:00 +0000 (09:29 -0400)
committerPhilip Durbin <philipdurbin@gmail.com>
Wed, 1 Aug 2012 13:29:00 +0000 (09:29 -0400)
perl6.mdwn [new file with mode: 0644]

diff --git a/perl6.mdwn b/perl6.mdwn
new file mode 100644 (file)
index 0000000..41a0a4d
--- /dev/null
@@ -0,0 +1,9 @@
+## Parsing JSON from the command line with `perl6`
+
+    [pdurbin@beamish ~]$ perl6 -e "use JSON::Tiny; say from-json('{ \"foo\" : \"one\", \"bar\" : \"two\" }').perl"
+    {"foo" => "one", "bar" => "two"}
+    [pdurbin@beamish ~]$ 
+    [pdurbin@beamish ~]$ perl6 -e "use JSON::Tiny; say from-json('{ \"foo\" : \"one\", \"bar\" : \"two\" }').<bar>"
+    two
+
+See also: http://irclog.perlgeek.de/perl6/2012-08-01#i_5866031