Using the magic ARGV handle - <> in perlop.
I do not know exactly why you want to read and write to your file
OP never said they wanted to.
Your code produces different answers from the OP's, the correct answer is "107 251 ".
In reply to Re^2: How to amend character count.
by Anonymous Monk
in thread How to amend character count.
by Peter Keystrokes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |