http://qs321.pair.com?node_id=926296


in reply to separating two sententences

When you say "doesn't work" it tells us nothing. Try telling us what your expected output and actual output were.

For starters, I would add:

use strict; use warnings;
to your script make coding errors more obvious. and I would hazard a guess that you are not opening the file properly. checking the return code of the open would find that:
open IN,"<","file" or die "error opening file: $!";


-pete
"Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."