Help for this page

Select Code to Download


  1. or download this
     sub median_num{
         my @sorted= @_; #using shift didn't work, why? format?
          &debug::debugdumplist("median_num():  \@sorted", \@sorted);
    
  2. or download this
    D:\PerlMonks>shift3.pl
    Using a hash as a reference is deprecated at D:\PerlMonks\shift3.pl li
    +ne 54.
    ...
    Use of uninitialized value in concatenation (.) or string at D:\PerlMo
    +nks\shift3.pl line 29.
     1 1 2 3 3 3 3 4 5 7 8 12 12 23 25 32 33 42 43 43 44 55
    D:\PerlMonks>
    
  3. or download this
        my ($middle,$median)=median_num(@new_sort);
        median_num(\@sorted);