Surround this with your loop and you may be golden (there are better regexes to match a floating number, but this should serve your purpose with the above dataset):
my ($highest) = sort { $b <=> $a } $string =~ /([\d\.-]+)/g; print "$highest\n";
In reply to Re: foreach nightmare!
by perlguy
in thread foreach nightmare!
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |