I would like to do something like this:&unpack_a( $lines[$_] ) if ( $RECORD_SEQ_ID eq 'A' ); &unpack_b( $lines[$_] ) if ( $RECORD_SEQ_ID eq 'B' ); &unpack_c( $lines[$_] ) if ( $RECORD_SEQ_ID eq 'C' );
and execute this line...is this possible?my $fun = "&UNPACK_$RECORD_SEQ_ID('$lines[$_]')";
In reply to execute a string as a function by fionbarr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |