Heya ll,
Been trying to hack together a little global that will do nothing but take the title from a link and shorten it to however long I want it to be. Not working that well - but then I also know next to nothing about writing globals - can anyone help?
my $link = $_[0];
if (length $link->{Title} > 20) {
$link->{Title} = substr($link->{Title}, 0, 20) . '...';
}
return $Title;
}
Safe swoops
Sangiro
Been trying to hack together a little global that will do nothing but take the title from a link and shorten it to however long I want it to be. Not working that well - but then I also know next to nothing about writing globals - can anyone help?

Code:
sub { my $link = $_[0];
if (length $link->{Title} > 20) {
$link->{Title} = substr($link->{Title}, 0, 20) . '...';
}
return $Title;
}
Safe swoops
Sangiro