in reply to substitute space to 0

Is your input tab delimited or dealing with fixed width columns?

I recommend first splitting the columns and then replacing space/undef with 0.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice