in reply to Trying to read numbers from a text file
use List::MoreUtils 'pairwise'; while (<DATA>) { y/ ()/,[]/; my( $D, $L, $M ) = eval { ( $a, $b ) = @{ [ eval ]->[ 1 ] }; pairw +ise { $a + $b } @$a, @$b }; print $@ || "$D $L $M\n"; }
Forgive me, for I have sinned.
|
|---|