Skip to content

Instantly share code, notes, and snippets.



Created Jan 9, 2016
What would you like to do?
#!/usr/bin/env perl
use CGI;
use Data::Dumper;
my $query=new CGI;
my $url = $query->param('url');
# print "Content-type: text/html\n\n";
if( $url =~ m/\/title\/tt([0-9]+)/){
print $query->redirect("$1");
}elsif( $url =~ m/\/.*imdb=([0-9]+)/){
print $query->redirect("$1");
print "Content-type: text/plain\n\n";
print Data::Dumper->Dump([$query]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.