I'm getting my second degree on May 6th, and I've already finished all my finals. All I have to do is finish up the final project for a UNIX class I signed up for. (I'm not a CS major, I just decided to take a UNIX class for my personal edification, and I had the time.)
Anyways, the final project is ridiculously simple, just making a webpage with CGI that will run on Solaris. I've made a lot of CGI using VBScript in the past, and I have to say the language is really nice. For example, to access POSTed form variables, you just do this:
Request.Form("variablename")
To get the exact same result in PERL, you need to do this:
read(STDIN, $my_input, $ENV{CONTENT_LENGTH});
@fv_pairs = split /\&/ , $my_input;
foreach $pair (@fv_pairs) {
if($pair=~m/([^=]+)=(.*)/) {
$field = $1;
$value = $2;
$value =~ s/\+/ /g;
$value =~ s/%([\dA-Fa-f]{2})/pack("C", hex($1))/eg;
$INPUT{$field}=$value;
}
}
$INPUT{variablename};
And that is why UNIX and Linux suck. Long live Microsoft.