There are plenty of snippets in
perldoc CGI and
perldoc perlsec. Try reading those first, and asking questions based on what you've read. If you've already read those, then try reading some more advanced materials, like
my columns.
-- Randal L. Schwartz, Perl hacker