Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Increaing a field size for a record

by Kenosis (Priest)
on Oct 16, 2012 at 17:07 UTC ( #999381=note: print w/ replies, xml ) Need Help??


in reply to Increaing a field size for a record

Here's a substitution option:

use strict; use warnings; use File::Slurp qw/read_file write_file/; write_file 'rij1.txt', map s/^(\S+) (\S+ )/"$1 $2" . ' ' x 39/er, read_file 'rij1.txt';

Have assumed the second field isn't empty, as it seems that the OP's suggesting it's currently fixed at 11 non-space characters to which 39 spaces are to be added.


Comment on Re: Increaing a field size for a record
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999381]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2015-07-05 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls