[prev] [index] [next]

Accessing Data Items (cont)

Example (dump a table of CGI params):

#!/usr/bin/perl

use CGI ':standard';

@params = param();

print header, "<html><body>";

foreach $p (@params) {
	$v = param($p);
	$rows .= "<tr><td>$p</td><td>$v</td></tr>";
}
print "<center><table border=1>
          <tr><td>Param</td><td>Value</td></tr>
          $rows
       </table></center>
       </body></html>
      ";