but it is not working
In what way?

I made 2 changes to your assignment to $data. I used q with parens because you have a single quote inside your string (client's), and I removed the trailing whitespace (other than \n) from all of your lines. This works for me:

use warnings; use strict; my $data = q(3rd Line Support - Managed Services & Hosting Caerphilly, Wales - Circa 40k DOE + Excellent Company Benefits Permanent Posted: Wednesday, 29 May 2013 3rd Line Support - Managed Services & Hosting Role: Providing support to client's infrastructures and maintaining high ava +ilability through proactive measures Resolving complex server issues escalated by other internal department +s by administration and troubleshooting problems. Ensuring clients & partners are updated on current status of issues Implement operational procedures, tools and best practice as defined i +n corporate business plan Ensure that knowledge is retained through documentation of processes a +nd procedures and implementation of server changes. Updating and maintaining our Knowledge base software. Documenting troubleshooting carried out Ensure all changes are documented through the change management proces +s Execute change management tasks in line with defined processes Assist in the analysis and resolution of problems as raised by the pro +blem management functions); $data=~ s/\n{2,50}/\n\n/g; print "$data\n";

In reply to Re: Clean a chunk of data by toolic
in thread Clean a chunk of data by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.