use warnings; use strict; use Test::More tests => 1; print "-------\n"; print json_q(); print "-------\n"; print json_here(); print "-------\n"; is(json_q(), json_here(), "should be the same"); sub json_q { q( "Type": 0, "Width": 504, "X": 18, "Y": 18 } ] }); } sub json_here { chomp(my $json = <<'END_JSON'); "Type": 0, "Width": 504, "X": 18, "Y": 18 } ] } END_JSON $json }