Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Limit Character ?

Quote Reply
Limit Character ?
Hello all,

I create new column 'Story' and i need to limit the output to 20 character, i try to create new global tag as below but still no luck :

Story_Limit =>
sub {
my $tags = shift;
my $Story = $tags->{Story};
$Story =~ s/^(.{20}).*$/$1.../;
return $Story;
}

Please help.
Quote Reply
Re: [reenee] Limit Character ? In reply to
Try:

sub {
my $tags = shift;
my $Story = $tags->{Story};
my $Story = substr ($Story, 0, 20);
return $Story;
}





PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Limit Character ? In reply to
Thanks pugdog, Its work...