in reply to Is a here-doc a good way to retrieve data file contents for testing?
Purely out of esthetical reasons
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__ }
changed END_JSON to __JSON__
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is a here-doc a good way to retrieve data file contents for testing? (updated)
by Lotus1 (Vicar) on Jan 18, 2021 at 01:14 UTC |