in reply to Re^3: reduce line of code
in thread reduce line of code

OT: just add
use strict ; use warnings ;
to your programs, witch would have detected your scoping problem!

LuCa