I want to add a comma to the Number of Links displayed by the <%Number_of_Links%> tag.
I would like to do this by adding a global, and using the following routine:
sub {
my $numlinks = ####;
$numlinks = &commify($numlinks);
sub commify {
local $_ = shift;
1 while s/^([-+]?\d+)(\d{3})/$1,$2/;
return $_;
}
return $numlinks;
}
I just need some help in what to put where I have #### in the code -- the actual code to select the number of links for a particular category. I know the rest of my routine works as I use it elsewhere.
Your help is appreciated,
Ryan
I would like to do this by adding a global, and using the following routine:
sub {
my $numlinks = ####;
$numlinks = &commify($numlinks);
sub commify {
local $_ = shift;
1 while s/^([-+]?\d+)(\d{3})/$1,$2/;
return $_;
}
return $numlinks;
}
I just need some help in what to put where I have #### in the code -- the actual code to select the number of links for a particular category. I know the rest of my routine works as I use it elsewhere.
Your help is appreciated,
Ryan