Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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

by Kenosis (Priest)
on Feb 07, 2013 at 07:00 UTC ( #1017578=note: print w/replies, xml ) Need Help??

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

The output string you shared has a length of 212, which is 40 fewer than the record size of 252--and you have exactly 40 empty fields, i.e., ||, in that string. If you filled each empty field with a character, e.g., an "X", you'd have a 252-byte record. Is this what you want to do? Since the records are | delimited, why does each record need to be 252 bytes?

If you do want to fill all the empty fields with an "X" (or some other character) you can do the following with the string:

$string =~ s/(?<=\|)(?=\|)/X/g;

However, it would be far better to address the data in your variables before creating that string.

My apologies if I've misunderstood your problem.

Update I: Athanasius makes an excellent point about the "|" character; I merely assumed it was the field delimiter.

Update II: Eliminating elements in your original posting makes your issue(s) a moving target and nullifies some responses; e.g., you've removed the record-size 'problem.' Nevertheless, your reformatting evidences a newline in one of your variables, and by the break in your output string, you should be able to tell which variable and then remove the newline.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017578]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2018-02-24 22:22 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (311 votes). Check out past polls.