Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: replace/substituion 4th field

by scsijon (Initiate)
on Feb 20, 2013 at 21:08 UTC ( #1019848=note: print w/replies, xml ) Need Help??


in reply to Re: replace/substituion 4th field
in thread replace/substituion 4th field

I'm new to this but I'd be doing something like

open file1 for input open file2 for output using >> so it appends .marker1. read a single line as variables $1, $2, ... use switch/case to select the field(s) you want to fix or alter change it(them) for that line of input (with case selecting fields you + want to alter in order) print to (output) file2 the variables $1,$2... check if endof input file if not goto the next line of the input file loop to .marker1. if eof input file add a print "\n"; to the output file (you usually need it) and close both input file and output file

simple I think, but i'm a newbie

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019848]
help
Chatterbox?
[marto]: no real change there then? :P
marto ducks

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2016-12-05 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (75 votes). Check out past polls.