in reply to Modifying file input before displaying output
Update: Op updated the post, so I'll do that as well ;) Step 3 involves a small computation then. And probably chomp to remove the newline from the string before treating it as a number.