eatr
Technical User
- Jan 20, 2006
- 48
I'm a Perl dabbler looking to write a program to facilitate my handicapping hobby.
below is a typical chart running line
<table width="100%" cellspacing=0 cellpadding=2><tr bgcolor="#F9D900" align=left><th>#</th><th>Horse</th><th>1/4</th><th>1/2</th><th>Str</th><th>Fin</th></tr>
<tr><td bgcolor="#DFDFCE"><b> 6</b></td><td><b>Towering Escape</b></td><td>1<sup>1/2</sup></td><td>1<sup>1/2</sup></td><td>1<sup>4</sup></td><td>1<sup>3 1/4</sup></td></tr>
<tr><td bgcolor="#DFDFCE"><b> 2</b></td><td><b>Love Strikes</b></td><td>3<sup>1/2</sup></td><td>3<sup>1/2</sup></td><td>2<sup>1</sup></td><td>2<sup>1 1/2</sup></td></tr>
<tr><td bgcolor="#DFDFCE"><b> 3</b></td><td><b>Mutakaway</b></td><td>4<sup>1</sup></td><td>4<sup>4</sup></td><td>4<sup>8</sup></td><td>3<sup>1 1/4</sup></td></tr>
<tr><td bgcolor="#DFDFCE"><b> 1</b></td><td><b>How 'bout No</b></td><td>2<sup>1 1/2</sup></td><td>2<sup>2</sup></td><td>3<sup>1/2</sup></td><td>4<sup>8 1/4</sup></td></tr>
<tr><td bgcolor="#DFDFCE"><b> 5</b></td><td><b>Heavenly Psalm</b></td><td>5<sup> </sup></td><td>5<sup> </sup></td><td>5<sup> </sup></td><td>5<sup> </sup></td></tr>
</table>
Focusing only on the numbers and the superscripts immediately following them: The number to the left indicates the running position at a
particular call, the superscript value is the number of lengths this particular horse is AHEAD of the horse directly behind it.
What I need to do is convert lengths ahead to lengths behind. This would mean that for the last place horse,
for example, we would sum the superscript value of all
the horses ahead of it at a given call. (So this value for
the leading horse, at each call, would be ZERO).
Here's the question? Can I do this without actually
pulling out the data and inserting into a 2D array,
then sorting. In other words, can I sort this in the
HTML file?
Not looking for someone to write the code, just to give
me some suggestions.
Thanks
below is a typical chart running line
<table width="100%" cellspacing=0 cellpadding=2><tr bgcolor="#F9D900" align=left><th>#</th><th>Horse</th><th>1/4</th><th>1/2</th><th>Str</th><th>Fin</th></tr>
<tr><td bgcolor="#DFDFCE"><b> 6</b></td><td><b>Towering Escape</b></td><td>1<sup>1/2</sup></td><td>1<sup>1/2</sup></td><td>1<sup>4</sup></td><td>1<sup>3 1/4</sup></td></tr>
<tr><td bgcolor="#DFDFCE"><b> 2</b></td><td><b>Love Strikes</b></td><td>3<sup>1/2</sup></td><td>3<sup>1/2</sup></td><td>2<sup>1</sup></td><td>2<sup>1 1/2</sup></td></tr>
<tr><td bgcolor="#DFDFCE"><b> 3</b></td><td><b>Mutakaway</b></td><td>4<sup>1</sup></td><td>4<sup>4</sup></td><td>4<sup>8</sup></td><td>3<sup>1 1/4</sup></td></tr>
<tr><td bgcolor="#DFDFCE"><b> 1</b></td><td><b>How 'bout No</b></td><td>2<sup>1 1/2</sup></td><td>2<sup>2</sup></td><td>3<sup>1/2</sup></td><td>4<sup>8 1/4</sup></td></tr>
<tr><td bgcolor="#DFDFCE"><b> 5</b></td><td><b>Heavenly Psalm</b></td><td>5<sup> </sup></td><td>5<sup> </sup></td><td>5<sup> </sup></td><td>5<sup> </sup></td></tr>
</table>
Focusing only on the numbers and the superscripts immediately following them: The number to the left indicates the running position at a
particular call, the superscript value is the number of lengths this particular horse is AHEAD of the horse directly behind it.
What I need to do is convert lengths ahead to lengths behind. This would mean that for the last place horse,
for example, we would sum the superscript value of all
the horses ahead of it at a given call. (So this value for
the leading horse, at each call, would be ZERO).
Here's the question? Can I do this without actually
pulling out the data and inserting into a 2D array,
then sorting. In other words, can I sort this in the
HTML file?
Not looking for someone to write the code, just to give
me some suggestions.
Thanks