Created
September 6, 2013 04:04
-
-
Save tokuhirom/6459423 to your computer and use it in GitHub Desktop.
Time::Seconds and autodie?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Time::Seconds qw(ONE_DAY); | |
use Time::Piece; | |
print( (localtime() - ONE_DAY)->ymd); | |
print $/; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use autodie; | |
use Time::Seconds qw(ONE_DAY); | |
use Time::Piece; | |
print( (localtime() - ONE_DAY)->ymd); | |
print $/; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[5.18.0] perl foo.pl | |
2013-09-05 | |
[5.18.0] perl bar.pl | |
Bareword "ONE_DAY" not allowed while "strict subs" in use at bar.pl line 6. | |
Execution of bar.pl aborted due to compilation errors. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment