Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 ( #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?


Comment on Re^2: How to push the previous line based on the current line to two different files.
Select or Download Code
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
Node Status?
node history
Node Type: note [id://993386]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2014-12-18 00:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls