The Movie Quiz

1) What SQL type would be best for the gross revenue of a movie?



2) Suppose I have a table with 100 movies, and 300 actors.  Bruce Willis was in 5 movies.  There are 3 "Die Hard" movies.  How many rows will this query return?

select * from movies, actors where movie.name RLIKE "%Die Hard%" and actors.name = "Bruce Willis";



3) (T/F) Can you write with sucess a HTML form that names a cgi script on a DIFFERENT server in the action= line?



4) What will this code print?  DO NOT TYPE IT IN!  TYPING IT IN IS FORBIDDEN!!!!!!
#!/usr/bin/perl
use IT;
it = IT->new();
it->a();
it->b();
package IT;
sub new {
    my($class) = shift;
     bless { $x => 0 }, $class;
}
sub a {
      my($self) = shift;
      $y = 12;
      $self->{"x"} = 17;
}
sub b {
      my($self) = shift;
      print $self->{"x"} . " = $y\n";
}
     

5-6) Write me a CGI script that lists who's logged in.  Hint:  The command to tell who's logged in is "w".

7-10) Write me a perl script that has an object that represents a interval, with a high and a low water mark.
It should have a set (1 pt) a constructor(1), and an add of two intervals (2 pts)