in reply to Re^2: 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 ( my ($open_bal, $net_trx, $cash_total, $card_total, $cheque_total, $grand_total) = $body_text =~ / Opening[ ]Balance[ ](.*)[ ]Net[ ]Transaction[ ](.*)[ ] Cash[ ]Total[ ](.*)[ ]Card[ ]Total[ ](.*)[ ] Cheque[ ]Total[ ](.*)[ ]Grand[ ]Total[ ]([^ ]*) /x ) { tr/$,//d for $open_bal, $net_trx, $cash_total, $card_total, $cheque_total, $grand_total; print ... }
Update: I hadn't escaped all the spaces. Fixed.
  • Comment on Re^3: Can't use string ("1") as a SCALAR ref while "strict refs" in use
  • Download Code