Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: How to push the previous line based on the current line to two different files.

by suno (Acolyte)
on Sep 13, 2012 at 07:10 UTC ( [id://993386]=note: print w/replies, xml ) Need Help??


in reply to Re: How to push the previous line based on the current line to two different files.
in thread How to push the previous line based on the current line to two different files.

Hi ,

Thanks for the help. But here in this i am able to print only the line immediate after 'EQU *'...

I wish to pring evrything after EQU *..

say suppose my input is

LABEL#1 EQU * $MAC ABORT LABEL#2 EQU * $NOT UPDATE,STOP T#TAB1 EQU * DC AL4(-1) L#DESK DC XL6 DESKRIPTOR L#SYMBOL DC CL30 SYMBOL L#TKKEY DC XL4 VALOREN-NUMMER FNK#005 EQU * CLI V#MUT,X'FF' WURDE MUTIERT ? BNE F05#000 NEIN MVI FUNK,4 MDF-TG ERZEUGEN $CALL MOD850,UP F$SFH TR_COMMIT
here according the above perl code u gave me, the output i aquire is:
CODE_FILE: LABEL#1 EQU * $MAC ABORT LABEL#2 EQU * $NOT UPDATE,STOP FNK#005 EQU * CLI V#MUT,X'FF' WURDE MUTIERT ? VARIABLE_FILE: T#TAB1 EQU * DC AL4(-1)

where i wish to get...

CODE_FILE: LABEL#1 EQU * $MAC ABORT LABEL#2 EQU * $NOT UPDATE,STOP FNK#005 EQU * CLI V#MUT,X'FF' WURDE MUTIERT ? BNE F05#000 NEIN MVI FUNK,4 MDF-TG ERZEUGEN $CALL MOD850,UP F$SFH TR_COMMIT B F05#100 VARIABLE_FILE: T#TAB1 EQU * DC AL4(-1) L#DESK DC XL6 DESKRIPTOR L#SYMBOL DC CL30 SYMBOL L#TKKEY DC XL4 VALOREN-NUMMER

What change shall i make in the above perl code so as to get this output?

Replies are listed 'Best First'.
Re^3: How to push the previous line based on the current line to two different files.
by Anonymous Monk on Sep 13, 2012 at 07:26 UTC

    What change shall i make in the above perl code so as to get this output?

    Do you have any guess?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-03-19 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found