in reply to Re: Repeat print problem
in thread Repeat print problem

Thanks. you are right. The summary does works great, but the $name part still print twice:
abc abc 0987766 ................................... ............................
Why? I checked I did not let it print more $name. Please help again and Thanks!!!

Replies are listed 'Best First'.
Re: Re: Re: Repeat print problem
by pzbagel (Chaplain) on Apr 28, 2003 at 18:20 UTC

    What happens when you print just the $name variable outside of the format statement? Place this in the code before or instead of the write:

    print "Name is: $name that's all.\n";

    It could be that the split is placing the wrong value into the @data array which subsequently gets copied into $name.

    Let us know if that sheds any light.