hi
i finally got it to work. it was very simple ... _if_ you remember that its not
but you are trying to match!
martin
On Wed, Apr 24, 2002 at 11:04:42AM -0400, David Gray wrote:
> > >May I suggest:
> > >(my $A = $a) =~ s/^(\d+)<\/td>/$1/;
> > >(my $B = $b) =~ s/^(\d+)<\/td>/$1/;
> >
> >
> >May I suggest:
> >(my $A = $a) =~ s/^(\d+)<\/td>/$1/;
> >(my $B = $b) =~ s/^(\d+)<\/td>/$1/;
>
> That's not what he's doing. He's doing:
>
> my ($A) = $a =~ m{^(\d+)};
> my ($B) = $b =~ m{^(\d+)};
>
> Yours leaves everything after the tacked onto the end
> of $A; mine and his only sto
On Apr 24, David Gray said:
>> > sub by_number_of_citations
>> > {
>> >$a =~ /\(.*?)\<\/td\>/;
>> >my $A = $1;
>> >$b =~ /\(.*?)\<\/td\>/;
>> >my $B = $1;
>> >
>> >$B <=> $A;
>> > }
>
>May I suggest:
>(my $A = $a) =~ s/^(\d+)<\/td>/$1/;
>(my $B = $b) =~ s/^(\d+)<\/td>/$1/;
Th
> > 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?
> >
> > # sting to match: 1212Cited
> > Work121232< /td>1999
> >
> > # sort routine
> > #
> > sub by_number_of_citations
On Monday, April 22, 2002, at 06:01 AM, [EMAIL PROTECTED] wrote:
> 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: 1212Cited
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: 1212Cited
Work1212321999
# sort routine
#
sub by_number_of_citations
{
$a =~ /\(.*?)\<\/td\>/;