use strict; use warnings; use Text::CSV; my $dataStr = <) { next if $line !~ /(-?\d*\.\d*)/; print "Value is $1\n"; } close $dataIn;