in reply to Re: Can't use string ("1") as a SCALAR ref while "strict refs" in use
in thread Can't use string ("1") as a SCALAR ref while "strict refs" in use
.............. 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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Can't use string ("1") as a SCALAR ref while "strict refs" in use
by ikegami (Patriarch) on Mar 09, 2010 at 15:29 UTC | |
|
Re^3: Can't use string ("1") as a SCALAR ref while "strict refs" in use
by ikegami (Patriarch) on Mar 09, 2010 at 19:28 UTC | |
|
Re^3: Can't use string ("1") as a SCALAR ref while "strict refs" in use
by ssandv (Hermit) on Mar 09, 2010 at 19:13 UTC |