in reply to Re^2: print +split
in thread print +split
Try:
Your code wasn't performing a subtraction. Also, as Roy mentioned the /^\d+/ wasn't matching.
while (<DATA>) { if (/regular files|archdone files/) { local $, = "\n"; s/,//; print +(split)[2], $,; $diff[++$i] = (split)[2]; } } print $diff[1]-$diff[2],"\n"; __DATA__ regular files 62,622 597.488G 641547379187 archdone files 62,535 597.008G 641032761295
Your code wasn't performing a subtraction. Also, as Roy mentioned the /^\d+/ wasn't matching.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: print +split
by drock (Beadle) on Mar 13, 2005 at 19:35 UTC | |
by chas (Priest) on Mar 13, 2005 at 20:56 UTC | |
Re^4: print +split
by drock (Beadle) on Mar 13, 2005 at 19:23 UTC |
In Section
Seekers of Perl Wisdom