Easy!Printing to the desired output using format

I have a problem with printing the data to a file.I want the next parameter to be beside it and not at another line.
This might not seem clear to you what I want. Thus, please see at my codes,my incorrect output and my ACTUAL output.
 

My incorrect output:

Waf si XB8B_Amodul
       _R1K_R_Rmea
...................



Waf si XB8B_Amodul XB8B_Amodul
       _R1K_R_Rmea _MFA1_FETCH
...............................


Waf si XB8B_Amodul XB8B_Amodul XB8B_Amodul
       _R1K_R_Rmea _MFA1_FETCH _MFA1_FETCH
...........................................


I want the output to be as follows:

Waf si XB8B_Amodul XB8B_Amodul XB8B_Amodul
       _R1K_R_Rmea _MFA1_FETCH _MFA1_FETCH
...........................................


My codes(Please take a look):

format FILEHANDLE2 =


Waf si @<<<<<<<<<<<@<<<<<<<<<<<@<<<<<<<<<<<
      $para1,     $para2,     $para3  
       @<<<<<<<<<<<@<<<<<<<<<<<@<<<<<<<<<<<
      $para11,    $para22,    $para33  

............................................
.

open(FILEHANDLE3,"tablefile5") || die "Cannot open file";
@file3 = <FILEHANDLE3>;
foreach(@file3)
{
     if(/.*!.*!.*!.*!/)
     {
       ($str1,$str2,$str3,$str4) = split(/!/,$_);
       push(@stuff,$str1);
       $para1 = substr($stuff[0],0,11);
       $para11 = substr($stuff[0],12,11);
       $para2 = substr($stuff[1],0,11);
       $para22 = substr($stuff[1],12,11);
       $para3 = substr($stuff[2],0,11);
       $para33 = substr($stuff[2],12,11);

       write FILEHANDLE2;
     }
}

kopibeanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kopibeanAuthor Commented:
Adjusted points to 20
0
ozoCommented:
write FILEHANDLE2 if @stuff == 3;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.