perlnoobster,
I just added flavors to your dish so that it is eatable and delicious!
$phn = "Apple iPhone 4 Black Cover"; print $trim = join '-', (map { substr($_, 0, 4) } split /\s+/, $phn);
In reply to Re: Retain first 4 characters of a string
by uday_sagar
in thread Retain first 4 characters of a string
by perlnoobster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |