Konrad,
    Is this what your looking for?
--------------------------------------------------
my $input = 'ABCDEFGHI';
my $output = $input;
$output =~ s/(\w{3})/\<p\>$1\<\/p\>/g;
print qq^\$input = "$input"\n^;
print qq^\$output = "$output"\n^;
--------------------------------------------------
To make it 40 characters instead of 3, simply change the 3 to a 40 in the {}'s

Out put from this is 
--------------------------------------------------
$input = "ABCDEFGHI"
$output = "<p>ABC</p><p>DEF</p><p>GHI</p>"
--------------------------------------------------

Regards,
David


----- Original Message ----- 
From: "Konrad Foerstner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 9:43 AM
Subject: formate text sequence


hi,

does anyone know a function or a module which
i can use to format a text which i get in a string.
i would like to get lines of 40 letters out of the 
string which are surrounded by "<p>" and </p>; the 
result should be stored in an string.

short example with 3-letter-lines:

$input = 'ABCDEFGHI';

--->  $output = '<p>ABC</p><p>DEF</p><p>GHI</p>'

cu

konrad

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to