User Profile

Collapse

Profile Sidebar

Collapse
melocoil
melocoil
Last Activity: Oct 10 '07, 11:59 PM
Joined: Sep 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • melocoil
    replied to Sorting
    in Perl
    yes.

    i you need to sort on several fields
    See more | Go to post

    Leave a comment:


  • melocoil
    replied to Sorting
    in Perl
    i try this but it's sort only one field:

    @a = split(/\|/,$a);
    @b = split(/\|/,$b);
    return @b[1] <=> @a[1] ;


    can u help me?
    See more | Go to post

    Leave a comment:


  • melocoil
    started a topic Sorting
    in Perl

    Sorting

    Hello,

    i want to sort data by $download and by $views .. this is the script:

    [code=perl]
    foreach $item (@lines) {
    ($id_file, $download,$view s) = split (/\|/, $item) ;
    }
    [/code]

    example:

    1 - 41
    2 - 51
    3 - 61
    4 - 71
    5 - 81
    6 - 91

    thanks
    See more | Go to post
    Last edited by numberwhun; Sep 24 '07, 11:33 PM. Reason: add code tags

  • melocoil
    started a topic Sorting
    in Perl

    Sorting

    Hello,

    i want to sort data by $download .. this is the script:

    [code=perl]
    foreach $item (@lines) {
    ($id_file, $download) = split (/\|/, $item) ;
    }
    [/code]

    thanks
    See more | Go to post
    Last edited by numberwhun; Sep 7 '07, 12:40 PM. Reason: add code tags
No activity results to display
Show More
Working...