in reply to print two arrays into a tsv format

First you should inspect your array @coordinate whether or not there are newlines in the elements. This can best be done with Data::Dumper:

use Data::Dumper; ... print Dumper \@coordinate;

If this confirms that there are newlines, you can either remove them from the elements of @coordinate using chomp @coordinate; or you need to fix it at the time of populating @coordinate. The latter would be preferred but you have not posted that piece of code.

Replies are listed 'Best First'.
Re^2: print two arrays into a tsv format
by rocketperl (Sexton) on Jul 03, 2013 at 06:24 UTC
    chomp @coordinate worked! thank you so much.

      You have chosen to cure the symptoms not the disease...

        you are right! i will try using data::dumper. thanks a lot