in reply to Time::Local and warnings

 perl -MTime::Local -we "print timelocal(0,0,0,15,6,2005),$/" works fine for me with perl 5.8.4. To turn off warnings just put a no warnings; into the scope of the calling function.
use Time::Local; ... { no warnings; print timelocal(0,0,0,15,6,2005),$/; }
or use
{ local $^W; ... }
Boris

Replies are listed 'Best First'.
Re^2: Time::Local and warnings
by Tanktalus (Canon) on Aug 04, 2005 at 20:13 UTC

    The no warnings option doesn't work because it's a compile-time directive. However, the local $^W option works perfectly. I knew there was a solution out there, but I had never had to use it before. Thanks a lot, borisz++! That will work wonderfully until I can convince the infrastructure team to upgrade Time::Local for their shared perl environment!