in reply to Re: multiple values per key
in thread multiple values per key
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: multiple values per key
by convenientstore (Pilgrim) on Jul 22, 2007 at 18:44 UTC | |
Here's what I mean. I am running a below code against file that has SIP message, which has various format according to what message and what situation. When I run below code against entire file, it works but exception of some areas where I don't get my value initialized and I suspect that when it goes through line (14-16), it doesn't find the match? and it skips out as I see error message but line 17 through 38, it recognize as entire record and process what it needs to.. What am I missing in line 14 through 16 that my regular expression is not matching(I want it to match so that it skips out(next record). top portion of file1 with line number printed out for identification
| [reply] [d/l] [select] |
by GrandFather (Saint) on Jul 22, 2007 at 23:53 UTC | |
should be:
You need to quote $ because it's the "end of line" match meta character. It would help to diagnose such problems if you tested your subsequent match and print a diagnostic if it fails:
DWIM is Perl's answer to Gödel | [reply] [d/l] [select] |
by convenientstore (Pilgrim) on Jul 23, 2007 at 01:18 UTC | |
| [reply] |
by convenientstore (Pilgrim) on Jul 22, 2007 at 23:18 UTC | |
Also, I try to debug this program, and I see that push happens twice(?) in one record. Why? There shoud be only one $callid and $sipm per record.
| [reply] [d/l] [select] |
by convenientstore (Pilgrim) on Jul 24, 2007 at 02:39 UTC | |
With print statement alone(which is commented out), it works as designed(with next two lines commented out) but when I run as above (with print statement # out with next two open with join), I get below
| [reply] [d/l] [select] |
by GrandFather (Saint) on Jul 24, 2007 at 03:37 UTC | |
Read the join docs. DWIM is Perl's answer to Gödel | [reply] |
by convenientstore (Pilgrim) on Jul 25, 2007 at 02:44 UTC | |
by convenientstore (Pilgrim) on Jul 25, 2007 at 03:27 UTC | |