Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Sort ofa Print Problem

by gav^ (Curate)
on Apr 26, 2002 at 02:08 UTC ( [id://162158]=note: print w/replies, xml ) Need Help??


in reply to Sort ofa Print Problem

my @stats = <DATA>; foreach my $line (sort { $a->[0] <=> $b->[0] } map { chomp; [split /\|/] } @stats) { my ($rate, $team, $comment, $gotdate) = @$line; print "$rate $team $comment\n"; print "<br>"; print "$ip $gotdate\n"; print "<br><br>"; } __DATA__ 10|A|Blah|10/1/02 14|B|Blah p9sdf kljsfd |1/6/01 4647|C|Blah adsg|15/7/02 1235|D|Blah fdfd|10/2/02
Note the $ip isn't defined anywhere. Is this a typo?

gav^

Replies are listed 'Best First'.
Re: Re: Sort ofa Print Problem
by caciqueman (Novice) on Apr 26, 2002 at 03:08 UTC
    To clarify my response:
    "it only prints the top lines and
    then returns a blank area."
    I mean that it only prints the page header,
    a few lines of html code that is above the
    sample I gave you, but the actual return
    from the amended script is now a blank area.
    Thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://162158]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-18 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found