in reply to Re^4: 5.40 released
in thread 5.40 released

$sth_insert->execute ( map { $fields{ $_ } } qw/ITEMNO OPTFIELD AUDTUSER AUDTORG VALUE TYPE LENGTH DECIMALS ALLOWNULL VALIDATE SWSET/ )

This will work but using map just for a hash slice is overkill. You can instead do:

$sth_insert->execute ( @fields{qw/ITEMNO OPTFIELD AUDTUSER AUDTORG VAL +UE TYPE LENGTH DECIMALS ALLOWNULL VALIDATE SWSET/} )

🦛

Replies are listed 'Best First'.
Re^6: 5.40 released
by talexb (Chancellor) on Jun 13, 2024 at 14:56 UTC

    Thanks -- you're absolutely right. There's no one else to do code review, so that kind of cleanup gets missed.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.