Advertisement
Guest User

Untitled

a guest
Aug 6th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.82 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;use warnings;
  3. use CGI;
  4. use DBI;
  5. use Template;
  6. use CGI::Carp qw{fatalsToBrowser};
  7. use Data::Dumper;
  8. my ($tt_object,$template,$vars,$sample);
  9.  
  10. my $cgi_object=new CGI;
  11. print $cgi_object->header('text/html');
  12.  
  13. my @params=$cgi_object->param;
  14.  
  15. my $username=$cgi_object->param("username");
  16. my $password=$cgi_object->param("passwd");
  17. my $fname=$cgi_object->param("fname");
  18. my $lname=$cgi_object->param("lname");
  19. my $address=$cgi_object->param("address");
  20. my $telephone=$cgi_object->param("tel");
  21. my $email=$cgi_object->param("email");
  22.  
  23. if(! @params=>[0]){print "EMPTY"}
  24. print "@params";
  25. print "@params[1]";
  26. $username =~ /(\w+)/;
  27. $email =~ /(.+)@(.+)\.(.{2,4})/;
  28. $password =~ /(.+)/i;
  29. $fname =~ /([\w\s-]+)/;
  30. $lname =~ /([\w\s-]+)/;
  31. $address =~ /([\w\s-]+)/;
  32. $telephone =~ /([\d\s-]+)/;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement