#!/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
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: How to specify a Null char in a match operation
by shmem
in thread How to specify a Null char in a match operation
by Nik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |