From a5db1ecacc773bd9a8ec50047a910e8c5c58b5f7 Mon Sep 17 00:00:00 2001 From: theolaa Date: Fri, 30 Jul 2021 20:47:26 -0700 Subject: [PATCH] Extra Perl Validation --- cgi/bmi_calculator.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cgi/bmi_calculator.pl b/cgi/bmi_calculator.pl index 6203253..6d97772 100644 --- a/cgi/bmi_calculator.pl +++ b/cgi/bmi_calculator.pl @@ -8,15 +8,15 @@ my $query = new CGI(); my %data; -$data{firstname} =$query->param('firstname'); +$data{firstname} $query->param('firstname'); $data{firstname}=~s/(<([^>]+)>)//ig; -$data{firstname} =~ s/^\s+|\s+$//g -$data{lastname} = $query->param('lastname'); +$data{firstname}=~s/^\s+|\s+$//g +$data{lastname}=$query->param('lastname'); $data{lastname}=~s/(<([^>]+)>)//ig; -$data{lastname} =~ s/^\s+|\s+$//g -$data{email} = $query->param('email'); +$data{lastname}=~s/^\s+|\s+$//g +$data{email}=$query->param('email'); $data{email}=~s/(<([^>]+)>)//ig; -$data{email} =~ s/^\s+|\s+$//g +$data{email}=~s/^\s+|\s+$//g # print $query->header; print "Content-type: text/html\n\n";