in reply to Arrays and division not working...
I have no idea how you got 0 for the second print. What I see is you should skip the header and append '\n' to the print statements.
Regardsopen(my $fh, '<', $file) or die "Could not open '$file' $!\n"; <$fh>; ### skip header while (my $line = <$fh>) { chomp $line; my ($drive, $sizegb, $freegb) = split (/,/,$line); print qq($sizegb\n); ### \n for new line $sizegb /= 1024; print qq($sizegb\n); ### \n for new line }
|
|---|