in reply to Repeat print problem

Your format just needs a slight change:

format STDOUT = @<<<<<< @<<<<<<<<<<<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $name, $id, $summary ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $summary .

The first summary field specification needs a caret instead of the @ to signify fill-mode for that field.

Replies are listed 'Best First'.
Re: Re: Repeat print problem
by Anonymous Monk on Apr 28, 2003 at 17:47 UTC
    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!!!

      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.