I don't mean to question da big chief but isn't that a bit lengthy?
Wouldn't this do the same job.....
$link->{Title} = s/^(.{30}).*$/$1.../;
If it is under 30 chars the whole thing will be shown otherwise the condensed version will be shown?
Quote:
$link->{Title} = (length $link->{Title} > 30) ? substr($link->{Title},0,30) . ' ...' : $link->{Title};Wouldn't this do the same job.....
$link->{Title} = s/^(.{30}).*$/$1.../;
If it is under 30 chars the whole thing will be shown otherwise the condensed version will be shown?