softserve has asked for the wisdom of the Perl Monks concerning the following question:
I've loaded a file into an array using Tie::File and I'm using grep load arrays with matching lines. This works fine for the various lines I want to extract, but not for one set of lines where I need just the second part of the lines that have a colon but not the colon nor what comes before it. Is there a way to use ${^POSTMATCH} to solve this problem?
I'm using...My current output looks like...@lines = grep (/:/, @array);
But what I need is...Date: 1 Mon 2007 Operator: Bill Manufacturer: Harris Corporation
Thank you for your time and effort.1 Mon 2007 Bill Harris Corporation
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I Postmatch an array element?
by ikegami (Patriarch) on Mar 20, 2010 at 03:32 UTC | |
|
Re: Can I Postmatch an array element?
by Anonymous Monk on Mar 20, 2010 at 03:34 UTC | |
|
Re: Can I Postmatch an array element?
by softserve (Initiate) on Mar 20, 2010 at 05:43 UTC |