in reply to extract numbers from unformatted text strings

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