use List::Util qw( min max ); while ( <INPUT> ) { my @n = /(\d+)/g; warn "Bad line $_\n", next unless @n; my ( $min, $max ) = ( min( @n ), max( @n ) ); do_something_with( $min, $max ); }
the lowliest monk
In reply to Re: extract numbers from unformatted text strings
by tlm
in thread extract numbers from unformatted text strings
by punch_card_don
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |