The quickest way is to do this:
my $tmp = $^W;
local($^W) = 0;
#offending code here
$^W = $tmp; # reset to original state
Although, if you're writing it correctly you shouldn't be getting this warning. Are you writing with 'use strict;'?
Erik Hollensbe