I'd like to take a string and manipulate it in a few ways.

If the string is 34 characters or less, I'd like to append a colon
character and save it to $var1.

If the string is longer than 34 characters, I'd like to save up to 35
characters to $var1, but cut off at the last possible space character
and not including that space character in the variable.  I'd then like
to save up to 26 characters of the cut off portion (not including the
previously mentioned space character) to $var2, cut off at the last
possible space character and not including that space character in the
variable.  $var2 should have an appended colon character.

Is that a tall order?  I'm hoping it's trivial for someone here.

Thanks,
Grant

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to