Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: sorting inside specific

by Random_Walk (Prior)
on Sep 10, 2004 at 13:30 UTC ( [id://390055]=note: print w/replies, xml ) Need Help??


in reply to sorting inside specific

As long as there is only one
<sep> <sep>
pair
perl -lne'print unless$s;push@s,$_ if$s;if(/<sep>/){if($s){foreach(sor +t @s){print}$s=0}else{$s+=1}}'

This is a bit quick and dirty as the last tag is included in the sort (no prob if the items to be sorted are all numeric)

Cheers,
R.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 14:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found