Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

A simple grouping of list items

by Lady_Aleena (Priest)
on Jul 07, 2012 at 19:12 UTC ( [id://980500]=CUFP: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $previous = "";
    for my $item (@list) {
    ...
      $previous = $item;
      $previous =~ s/^(.+)\: .+/$1/; # the regex by which you want to grou
    +p your items
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found