> "M" == Matt writes:
>>> You probably want something like:
>>>
>>> substr $x, 10, -10, " ... " if length $x> 25;
>>
>> Very neat Paul. My hat's off to you.
M> Worked perfectly too. Thanks Paul.
the real question is whether you read the docs on substr and understand
how t
>> You probably want something like:
>>
>> substr $x, 10, -10, " ... " if length $x> 25;
>
> Very neat Paul. My hat's off to you.
Worked perfectly too. Thanks Paul.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.
On 05/04/2011 22:56, Paul Johnson wrote:
On Tue, Apr 05, 2011 at 04:25:12PM -0500, Matt wrote:
I am looking for a perl function or easy way to shorten a long string
if its over X characters.
Say I have:
"Doe, John; 56943 Walnut Drive; SomeCity, NY"
It messes up the display of my html form.
On Tue, Apr 05, 2011 at 04:25:12PM -0500, Matt wrote:
> I am looking for a perl function or easy way to shorten a long string
> if its over X characters.
>
> Say I have:
>
> "Doe, John; 56943 Walnut Drive; SomeCity, NY"
>
> It messes up the display of my html form. So I would like it changed to