- or download this
sub getFileSize
{
my( $fileName )= @_;
return -s $fileName;
}
- or download this
sub getFileSize
{
...
}
return $size;
}
- or download this
my $fileName= getFileName();
my @size;
...
} else {
print "Can't determine file size for $fileName: $!\n";
}
- or download this
my %sizes= (
$inputFile => getFileSize($inputFile),
$controlFile => getFileSize($controlFile),
);
- or download this
my %object= (
InputFile => $inputFileName,
...
ControlSize => getFileSize($controlFileName),
);
return bless \%object;
- or download this
my %sizes= (
$inputFile => $controlFile,
...
$controlFileName => "ControlSize",
);
return bless \%object;
- or download this
my %sizes= (
$inputFile => scalar -s $inputFile,
$controlFile => scalar -s $controlFile,
);
- or download this
my @files= getFileNames();
...
# or
my %sizes;
@sizes{@files}= map getFileSize($_), @files;
- or download this
my @files= getFileNames();
my @sizes;
for my $fileName ( @files ) {
push @sizes, getFileSize( $fileName );
}
- or download this
sub missingIsSmallest
{
...
my @files= sort {
missingIsSmallest( getFileSize($a), getFileSize($b) )
} getFileNames();
- or download this
reportFile( $file, getFileSize($file), "Financials" );
# or
...
FileSize => getFileSize($file),
Description => "Financials",
);