<?xml version="1.0" encoding="windows-1252"?>
<node id="989455" title="Retain first 4 characters of a string" created="2012-08-24 04:59:35" updated="2012-08-24 04:59:35">
<type id="115">
perlquestion</type>
<author id="982430">
perlnoobster</author>
<data>
<field name="doctext">
Hi perl monks,

I was wondering if someone could help me with the following, i have the following string as an example: Apple iPhone 4 Black Cover (keeping in mind I have various different strings)

Is it possible to retain the first 4 characters for each word? separated by a hyphen i.e to display the following:

Appl-iPho-4-Blac-Cove

Please can someone help me?

Thank you :)</field>
</data>
</node>
