.............. if($body_text=~m/Opening Balance (.*) Net Transaction (.*) Cash Total +(.*) Card Total (.*) Cheque Total (.*) Grand Total ([^ ]*) /) { $open_bal=join "",split ",",substr($1,1); $net_trx=join "",split ",",substr($2,1); $cash_total=join "",split ",",substr($3,1); $card_total=join "",split ",",substr($4,1); $cheque_total=join "",split ",",substr($5,1); $grand_total=join "",split ",",substr($6,1); print "Open Balance: ",$open_bal,"\n"; print "Net Transaction: ",$net_trx,"\n"; print "Cash Total: ",$cash_total,"\n"; print "Card Total: ",$card_total,"\n"; print "Cheque Total: ",$cheque_total,"\n"; print "Grand Total: ",$grand_total,"\n"; } .....................
($open_bal,$net_trx,$cash_total,$card_total,$cheque_total,$grand_total +)=join "",split ",",substr($$_,1) for (1..6);
In reply to Re^2: Can't use string ("1") as a SCALAR ref while "strict refs" in use
by Anonymous Monk
in thread Can't use string ("1") as a SCALAR ref while "strict refs" in use
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |