#!/usr/bin/perl -w use CGI; use strict; my $q = new CGI; print $q->header; print $q->start_html; my $p = $q->param('foo'); print $p =~ s/\0/�/g ? "$p - null char detected\n" : "$p fine.\n"; print $q->end_html; __END__ call e.g. with http://localhost/cgi-bin/foo.pl?foo=foo%00bar