Hello Monks, Like I said I'm a newbie. I would like to find some help. My requirement is: I have a variable with text like
#!/usr/bin/perl -w use warnings; use strict; use Spreadsheet::Read 'ReadData'; use Encode 'decode'; use XML::LibXML; use Text::FixEOL; no warnings; my $INFILE = 'TestPGR.xlsx'; my $ENCODING = 'MacRoman'; my $OUTFILE = 'TestPGR.xml'; my %FIELDS = ( 1=>'docid', 2=>'title', 3=>'version', 4=>'revision', 5=>'node_order', 6=>'description', 7=>'status', 8=>'type', 9=>'expected_coverage', ); my $text = "Sur toutes les ressources « Usine » on suivra les valeurs +suivantes : • Temps de préparation machine (Heures machine des Arrêts programmés)" +;
I would like to learn to loop on my variable and convert end of line with HTML tag like my $text ="Sur toutes les ressources « Usine » on suivra les valeurs suivantes :
• Temps de préparation machine (Heures machine des Arrêts programmés)"; I have tried with HTML::Parser without any success, someone can give me some help to find an approach ? Thanks for all, Bala

In reply to [Solved]Newbie - convert carriage return in a variable by Balawoo

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.