in reply to Re^2: Help requested to find the cause of an "uninitialized value" message
in thread Help requested to find the cause of an "uninitialized value" message
And therefore the pattern match will match: <Dumped-data-from-%INFO>:DONE::MSG:<Dumped-data-from-another-%INFO>
That's definitely something I would recommend you look into. Another possibility is that $collected is something like ":MSG:stuff:DONE::MSG:stuff" when you do $collected = "", breaking the stream, or that :MSG: and :DONE: are a part of the Dumper output. Although I still don't recommend using Data::Dumper and especially eval for this, here are some steps you can take. First, make your start and end markers a little more robust: I think for example Data::Dumper wouldn't output a "\0" when its Useqq option is turned on (and you can even validate this by checking the string before you send it). Second, use a s/// regex to remove output you get from $collected instead of completely clearing it, and/or validate the format of $collected before you do.
If you still have trouble, it would be great if you could combine the tidbits of code you've provided into an SSCCE that reproduces the issue, then I'm sure we can get it debugged pretty quick.
Update: A few minor additions to the above.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Help requested to find the cause of an "uninitialized value" message
by andyok (Novice) on Jan 25, 2022 at 13:52 UTC | |
by Marshall (Canon) on Jan 29, 2022 at 17:58 UTC |