Sara has asked for the wisdom of the Perl Monks concerning the following question:
I want to grep for the update status and see if it is open if it is then I want to print the path next to it , in this case my output should be theUpdate ID: pa Update Status: open (view: pa_lden-cr_q00457655_EFLT) Branch Type: lden Comment: <* Software Update Template *> <*Version: dflkasd
I am doing the following and able to check weather it is new ,, but to get the view there is a problem in my code:$view = pa_lden-cr_q00457655_EFLT
can someone show me the problem ,, thanks guys .while(<check>) { if (m/^(?:Update Status:)\s*(\w+)/) { $target = $1 } if ( $target eq "open") { if (m/^(?:Update Status:)\s*(\w+)\s*(\w+)$/) { $view = $1 } } print "$target\n"; print "$veiw\n"; close(check);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex on a line
by arturo (Vicar) on Aug 01, 2002 at 16:28 UTC | |
|
Re: regex on a line
by Basilides (Friar) on Aug 01, 2002 at 16:40 UTC | |
|
Re: regex on a line
by Tomte (Priest) on Aug 01, 2002 at 16:07 UTC | |
|
Re: regex on a line
by Nightblade (Beadle) on Aug 01, 2002 at 15:58 UTC | |
|
Re: regex on a line
by CukiMnstr (Deacon) on Aug 01, 2002 at 16:18 UTC | |
|
Re: regex on a line
by fglock (Vicar) on Aug 01, 2002 at 16:02 UTC |