[svn:parrot] r46068 - trunk/examples/json

mikehh at svn.parrot.org mikehh at svn.parrot.org
Tue Apr 27 17:34:54 UTC 2010


Author: mikehh
Date: Tue Apr 27 17:34:53 2010
New Revision: 46068
URL: https://trac.parrot.org/parrot/changeset/46068

Log:
change in-place string ops

Modified:
   trunk/examples/json/postalcodes.pir

Modified: trunk/examples/json/postalcodes.pir
==============================================================================
--- trunk/examples/json/postalcodes.pir	Tue Apr 27 17:22:14 2010	(r46067)
+++ trunk/examples/json/postalcodes.pir	Tue Apr 27 17:34:53 2010	(r46068)
@@ -1,5 +1,5 @@
 #!../../parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
 # $Id$
 
 =head1 NAME
@@ -64,11 +64,11 @@
     close sock
 
     $I1 = find_charset 'unicode'
-    trans_charset json_result, $I1
+    json_result = trans_charset json_result, $I1
 
     # Strip off http headers.
     $I0 = index json_result, "\r\n\r\n"
-    substr json_result, 0, $I0, ""
+    json_result = replace json_result, 0, $I0, ""
 
     load_language 'data_json'
     $P1 = compreg 'data_json'


More information about the parrot-commits mailing list