in reply to Re: Can I match a range from an array?
in thread Can I match a range from an array?
Now you say I don't need to grab the line with a regex match and you then say I need one to capture it? I'm kinda unclear there. See I don't know what the numbers on the end will be so I can't use grep to capture it.$1 = "Cell ID for First Cell: MCC: 310 MNC: 64 LAC: x'44D CI: x'MAD +023"; #This is what I want to print. %Firstcell = ( "Cell ID for First Cell: MCC: 310 MNC: 64 LAC: x'44D CI: x'4F07", " +Cell ID for First Cell: MCC: 310 MNC: 64 LAC: x'44D CI: x'MAD023", Cell ID for First Cell: MCC: 310 MNC: 64 LAC: x'44D CI: x'270B", "C +ell ID for First Cell: MCC: 310 MNC: 64 LAC: x'44D CI: x'APPL2B");
I only have one problem. For some damn reason "$_" won't print anything. I have:if ($lastheading = "MSTerminating") { if (grep "$1", @lines) { print "$_"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Can I match a range from an array?
by rchiav (Deacon) on Aug 03, 2001 at 19:05 UTC | |
by dragonchild (Archbishop) on Aug 03, 2001 at 19:21 UTC | |
by brassmon_k (Sexton) on Aug 03, 2001 at 22:33 UTC | |
by rchiav (Deacon) on Aug 03, 2001 at 23:08 UTC | |
by brassmon_k (Sexton) on Aug 04, 2001 at 00:18 UTC | |
|
Re: Re: Re: Can I match a range from an array?
by brassmon_k (Sexton) on Aug 03, 2001 at 19:25 UTC | |
by snafu (Chaplain) on Aug 04, 2001 at 00:14 UTC | |
by brassmon_k (Sexton) on Aug 04, 2001 at 00:33 UTC |