in reply to subtracting two lines in file
perl -anE '($s,$F[1])=($F[1],$F[1]-$s);say "@F"' <your-file> [download]