Last active
May 11, 2023 13:21
-
-
Save szabgab/34832fea509e8154ed348e2ee67ab312 to your computer and use it in GitHub Desktop.
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 feature 'say'; | |
| use Time::HiRes qw(sleep time stat); | |
| { | |
| open(my $fh, '>', 'first.txt'); | |
| close $fh; | |
| } | |
| say "before ", time; | |
| sleep(0.0006); | |
| say "after ", time; | |
| { | |
| open(my $fh, '>', 'second.txt'); | |
| close $fh; | |
| } | |
| my $first = (stat('first.txt'))[9]; | |
| my $second = (stat('second.txt'))[9]; | |
| say "first $first"; | |
| say "second $second"; | |
| say $first == $second ? "same" : "different"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.