This could be a base for the program you want. I don't really get the stuff about 'derivative' so i ignored it.### Open the file if (open (FH, "file.txt")) { ### Run through each line of the file (line will be put in $_) while (<FH>) { ### Set the maximum to -1 my $max = -1; ### Run through all the numbers on this line while (m/([0-9\.\-]+)/g) { ### number is put in $1 by regexp if ($1 > $max) { $max = $1; } } print "$max\n"; } close (FH); }
In reply to Re: Re: Re: foreach nightmare!
by Jaap
in thread foreach nightmare!
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |