Sorting arrays.

They have: 62 posts

Joined: May 2000

Is there a way to sort arrays in ASCII order, yet ignore certain characters while doing so?

They have: 850 posts

Joined: Jul 1999

Try
@array = sort(@array);

THat what you wanted?

------------------
click here to help save lives
http://www.wiredstart.com : The Technology Start Page

They have: 62 posts

Joined: May 2000

This is the problem. I have titles surrounded by table tags. Like...
<table>
<tr>
<td>
Blashdsfkd
</td>
</tr>
<tr>
<td>
dmncvm,vcmcxmd
</td>
</tr>
</table>

Now, I want to alphabetize the words in bold, yet the table tags get in the way. I'm curious if there is a way to ignore the table tags and just have it process the bold words.

------------------

merlin's picture

They have: 410 posts

Joined: Oct 1999

quote:<table>
<tr>
<td>
Blashdsfkd
</td>
</tr>
<tr>
<td>
dmncvm,vcmcxmd
</td>
</tr>
</table>


is in your array?
well, i'm new with all this, but i'd say you could use regexp:
s/<table>//g
'bout 2 things i'm not sure:
- do i have to escape < and > with \?
- what about newline? is the above correct or would it be s/<table>\n//g? (or something else?
as i said, i'm still trying...

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.