... { no warnings 'redefine'; sub redirect { # code for redirect will go here } } # CGI's redirect() can then still be used fully qualified: # print CGI::redirect('http://somewhere.else/');