DelphiFAQ Home Search:
General :: Programming :: perl
General questions about perl.


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

Temporarily turn off warnings in perl (older version)


How can I turn off warnings for a part of my perl code? I read about a pragma use warnings and no warnings but this is not available because I use an older version of perl.


Pragma 'warning' was introduced with perl 5.6.0
You can use the code shown below instead:

   # we have to turn off warnings for this one call
   local $^W = 0;
   # ..
   # offensive code now
   # ..
   # automatically restore warning settings as you leave the block

Generated 8:01:35 on Aug 13, 2020