# disable all warnings no warnings; my $x; if ($x = 1) {} # disable only warnings regarding syntax no warnings 'syntax'; my $x; if ($x = 1) {}