File: custom_perl_want_json_module.pl

package info (click to toggle)
python-mitogen 0.3.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,456 kB
  • sloc: python: 22,134; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (16 lines) | stat: -rw-r--r-- 295 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl

my $WANT_JSON = 1;

my $json;
{
  local $/; #Enable 'slurp' mode
  open my $fh, "<", $ARGV[0];
  $json_args = <$fh>;
  close $fh;
}

print "{\n";
print ' "message": "I am a want JSON perl script! Here is my input.",' . "\n";
print ' "input": ' . $json_args . "\n";
print "}\n";