The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#! perl

use strict;

our $sz;
our $tf;

my @unlinks;

sub create_testfile {
    my $tf = shift;
    open(my $f, ">", $tf);
    print { $f } ( localtime(time)."\n");
    close($f);
    my $sz = -s $tf;
    ok($sz, "Test file creation");
    @unlinks = ( $tf );
    $sz;
}

sub verify {
    my $tf = shift;
    my $tag = shift;
    push(@unlinks, $tf);
    is(-s $tf, $sz, "$tag check");
    $tf;
}

sub cleanup {
    unlink(@unlinks);
}

1;