How would I change the following code to, if the subject is over 30 characters, to display the first 30 characters of the subject plus an ellipsis (...) at the end?
Thanks!
sub {
my $post_subject = shift;
return substr($post_subject,0,60);
}
Thanks!
Code:
sub {
my $post_subject = shift;
return substr($post_subject,0,60);
}