in reply to Perl Newbie trying to figure out how to find out Median in my program
Use Single quotes if run on Linux.
See how to find median value for the calculation details.perl -ne "chomp;last if $_ <0; push @val, $_}{@s=sort {$a<=>$b} @val;p +rint qq||,($s[$#s/2+0.1]+ $s[$#s/2+0.6])/2,qq|\n|"
If curious, lookup the Eskimo Greeting operator that is used here.
...Disinformation is not as good as datinformation. Don't document the program; program the document.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Newbie trying to figure out how to find out Median in my program
by Anonymous Monk on Apr 19, 2017 at 21:31 UTC | |
by NetWallah (Canon) on Apr 19, 2017 at 22:54 UTC |