Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: how can i increase the size of a record in a file

by Athanasius (Chancellor)
on Feb 07, 2013 at 06:57 UTC ( #1017577=note: print w/replies, xml ) Need Help??

in reply to how can i increase the size of a record in a file

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,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017577]
[shmem]: karlgoethebier: of course
[shmem]: has there been any single day where nothing went wrong? not in my memory
[shmem]: discovered a fuel tank leakage at my second hand motorbike. Some bloke drove a screw too long through the fairing
[shmem]: hard to fix, and plans wrecked. And more... won't tell.
[shmem]: the leakage has been "fixed" with a piece of bycicle tube. Bleargh.
[karlgoethebier]: shmem: yes. my first ride tomorrow is questionable because of lumbago. shit
[shmem]: But! the bloke wasn't me, at least.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2017-06-25 19:58 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (570 votes). Check out past polls.