hi
im trying to sort out this sort routine:
the sub by_number_of_citations works
but if i try to make a sort alphabetically, my regex fails?
how should it be done?
martin
# sting to match: <tr><td>1212</td><td>Cited
Work</td><td>12</td><td>1232</td><td>1999</td></tr>
# sort routine
#
sub by_number_of_citations
{
$a =~ /\<td\>(.*?)\<\/td\>/;
my $A = $1;
$b =~ /\<td\>(.*?)\<\/td\>/;
my $B = $1;
$B <=> $A;
}
# sort routine
#
sub alphabetically
{
$a =~ /^\<tr\>\<td\>\d+\<\/td\>\<td\>(.*)\<\/td\>/;
my $A = $1;
$b =~ /^\<tr\>\<td\>\d+\<\/td\>\<td\>(.*)\<\/td\>/;
my $B = $1;
$A cmp $B;
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]