use strict; use warnings; print "-------\n"; print json_here(); print "-------\n"; sub chompit { my $str = shift; chomp $str; return $str; } sub json_here { chompit << '__JSON__' ; "Type": 0, "Width": 504, "X": 18, "Y": 18 } ] } __JSON__ }