File: dumpargs

package info (click to toggle)
libcgi-test-perl 1.111-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 380 kB
  • sloc: perl: 2,572; sh: 96; makefile: 2
file content (21 lines) | stat: -rwxr-xr-x 367 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

$PERL -x 3<&0 <<'END_OF_SCRIPT'
#!perl

use CGI qw/:standard/;

# 2 argument open here for older Perls
open STDIN, '<&3' or die "Can't reopen STDIN";

print header(-type => "text/plain");

local $CGI::LIST_CONTEXT_WARN = 0;

foreach my $name (param()) {
	my @value = param($name);
	foreach (@value) { tr/\n/ /; }
	print "$name\t@value\n";
}

END_OF_SCRIPT