newperlbie has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Please help me to read multiple consequtive lines from a file. The file looks like this
aaa23 fgfgdf pppp Released test bbb34 fgfgdf pppp Released test dfsad324 fgfgdf pppp Released test efdewr23 fgfgdf pppp Released dev dsarfew234 fgfgdf pppp skip dev dqewr2321 fgfgdf pppp skip prod sdsw32 fgfgdf pppp Released prod asdw234 fgfgdf pppp Released prod sadw2342 fgfgdf pppp Released qa deww234 fgfgdf pppp Released qa qdrqew234 fgfgdf pppp block qa swd234 fgfgdf pppp Released manage swdq234 fgfgdf pppp Released manage dfwfr43 fgfgdf pppp Released manage drqewr234 fgfgdf pppp Released manage
the output should be all the lines from "dev" to "manage" ; the keys dev and manage would be known, but the inbetween one "qa" "prod" would be unknown.
thanks in advance.
2018-08-08 Athanasius added code and paragraph tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading multiple lines from text file
by choroba (Cardinal) on Aug 07, 2018 at 15:57 UTC | |
by newperlbie (Acolyte) on Aug 07, 2018 at 20:51 UTC | |
by choroba (Cardinal) on Aug 07, 2018 at 21:35 UTC | |
by Athanasius (Archbishop) on Aug 08, 2018 at 05:55 UTC | |
by newperlbie (Acolyte) on Aug 08, 2018 at 07:20 UTC | |
by Athanasius (Archbishop) on Aug 08, 2018 at 07:45 UTC | |
| |
|
Re: Reading multiple lines from text file
by johngg (Canon) on Aug 08, 2018 at 10:24 UTC |