# w3dumpvar.pl v0.1 by Brooks Cutter (bcutter@stuff.com) # modified from standard dumpvar by Randal Schwartz. (99% of the code is his..) # # This is a modified version of the dumpvar that comes with the standard # perl v4.036 distribution. This modified dumpvar is useful for use # with CGI scripts and other programs that generate HTML output. # This package hides it's output with # and escapes '<' and '>' in the output so it won't be interpreted by # web browsers (like Mosaic) # # What this package does that dumpvar doesn't: # # 1. puts a nice header that lists the arguments to dumpvar, like: # package dumpvar; # translate control chars to ^X - Randal Schwartz sub unctrl { local($_) = @_; s/([\001-\037\177])/'^'.pack('c',ord($1)^64)/eg; s/>/>/g; # convert > to > s/\n"; } 1;