Thank you :)
Probably should have read some more before posting. Well the code does not work if some of the fields are left undefined i.e. this section of code:
$consname = "" if !defined($consname);
$subdvn = "" if !defined($subdvn);
$chequeno = 0 if !defined($chequeno);
$receiptno = 0 if !defined($receiptno);
$amount= 0 if !defined($amount);
Sample data:
M/s. Something Pvt. Ltd.!Elm Street!134!27456.00 ---no cheque no.
Somethin&Someone!New Park Street!29787!135!28477.00
Something-Something!Washington!136!28476.00 ---no cheque no.
Someone!Pole Street!38947!137!28376.00
Also for variable length fields e.g, $consname,$subdvn, the space between the columns in the report is not adjusted.
If the report contained several rows of data formatting the space between columns would be tedious. Is there a solution to this?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.