Hi all,
It's Friday, can't think anymore, help...Do you see anything wrong with the following? I don't see how the results are -2 and 0s
$ostype = $inforec->ostype;
$directory = $inforec->directory;
$size = int($inforec->size);
$timeframe = $inforec->timeframe;
print "build_mm_rec: $ostype, $directory, $size, $timeframe\n";
if ($ostype eq 'N') {
print "getting space, size: $size\n";
$TotalNumberOfFreeBytes = (Win32::DriveInfo::DriveSpace($directo
+ry))[6];
$TotalNumberOfFreeBytes = int($TotalNumberOfFreeBytes);
print "space 1: $TotalNumberOfFreeBytes\n";
my $holder = $TotalNumberOfFreeBytes - 1;
print "space 1.5: $holder\n";
$holder = $size / $size;
print "space 1.6: $holder\n";
$TotalNumberOfFreeBytes = $TotalNumberOfFreeBytes / $size;
print "space 2: $TotalNumberOfFreeBytes\n";
$TotalNumberOfFreeBytes = $TotalNumberOfFreeBytes / $size;
print "space 3: $TotalNumberOfFreeBytes\n";
$TotalNumberOfFreeBytes = (((Win32::DriveInfo::DriveSpace($direc
+tory))[6])/$size)/$size;
}
else {
$TotalNumberOfFreeBytes = getFreeDisk($size);
print "unix space\n";
}
print "space: $TotalNumberOfFreeBytes\n";
result
build_mm_rec: N, c:, 1024, mm
getting space, size: 1024
space 1: 17298208768
space 1.5:
-2
space 1.6: 1
space 2:
0
space 3:
0
space:
0
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.