Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Hello rajsai28, and welcome to the Monastery!

Like vinoth.ree, I don’t know what you are asking. So I’ll just make two observations:

  1. If the fields can contain the separator character |, then the output is meaningless because there is no way to tell where one record ends and the next begins. But if they can’t contain that character, then the output shown cannot have come from the print statement shown, because the former contains 60 such characters but the latter only 21.

  2. You can save yourself a lot of typing by using join:

    16:41 >perl -Mstrict -wE "my @recs = (1, 'a', 2, 'z'); print STDOUT jo +in('|', @recs), qq[\n];" 1|a|2|z 16:44 >

Hope that helps,

Update: The question as originally posted contained the following print statement:

print DETAIL $Record_Detail_id."|".$NUMBER."|".$NUMBER1."|".$NUMBER2." +|".$NUMBER4."|".$NUMBER5."|".$NUMBER6."|".$NUMBER12."|".$State_Provin +ce_Code."|".$Org_Id."|".$Vendor_Name."|".$Dummy_Field_7."|".$Dummy_Fi +eld_8."|".$Dummy_Field_9."|".$Dummy_Field_10."|".$Dummy_Field_11."|". +$Dummy_Field_12."|".$Dummy_Field_13."|".$Dummy_Field_14."|".$Dummy_Fi +eld_15."|".$Dummy_Field_16."|".$Action_time_stamp."\n";

It was this to which my reply referred.

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

In reply to Re: how can i increase the size of a record in a file by Athanasius
in thread how can i increase the size of a record in a file by rajsai28

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (6)
    As of 2015-11-30 04:50 GMT
    Find Nodes?
      Voting Booth?

      What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

      Results (757 votes), past polls