Y2K Diary [ 24.03.00 ]

84. Programming (Part 9)

Perl.  Brings a different level of interactivity into your web pages.
Stored in a cgi-bin folder on the web server, and called by users from a HTML front-end.
Can perform functions such as database management, automated email replies and form verification, so creating applications like shopping baskets, online games, chat boards, etc. NP

                                                                                               Perl

foreach $pair (@pairs) {
   ($name, $value) = split(/=/, $pair);
   $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
   $value =~ s/\0//g;
   $value =~ s///g;
   if ($allow_html != 1) {
      $value =~ s/<([^>]|\n)*>//g;
   } else {
      unless ($name eq 'body') {  $value =~ s/<([^>]|\n)*>//g;  }
   }
}
                                                                                                     

related links:
Scripts and CGI programming search engine.
Free scripts.  World of Perl.  Library

[ submit entry ]      [ contents ]      [ previous ]  [ next ]