http://www.perlmonks.org?node_id=853124


in reply to Re: Question on format statement
in thread Question on format statement

Hello,

It was the space before "." causing the problem. Putting it in the 1st column solved the problem. Thanks a lot everyone.

perl seeker

Update

I however want to ask another question regarding the code. Is it possible to use several other conditional checks (if statements) to write separate blocks, of data onto the output .doc file? Using the same code I mean. Putting another if statement inside the for loop does not work and the output data rows get mixed up. For example:
$sub1='FB'; $tow1='RP'; $ph3='3'; if (($subdvn eq $sub1) && ($tow eq $tow1) && ($phase eq $ph3)) { write(FS); $fb_rp_3_tot += $amount; $fbqty3 = $fbqty3 + 1; }
Is there something like a case statement in Perl? Any help would be appreciated.