What , exactly, is going on here? Answer the question by addressing the following two points. Refer to Figure 1 in writing your answer.
#!/usr/local/bin/perl # $qs = "name_var=%28+john+++smith%29&submitbutton=submit"; #DEPLUS $qs =~ tr/\+/ /s; #TOKENIZE @av_strings = split(/&/, $qs); #SPLIT foreach $avs (@av_strings) { @av_pair = split(/=/, $avs); $attr_value{$av_pair[0]} = $av_pair[1]; } #DECODE foreach $key (keys %attr_value) { $key =~ s/%(..)/pack("c",hex($1))/ge; $attr_value{$key} =~ s/%(..)/pack("c",hex($1))/ge; }
Signed: __________________________
Go to course homepage