in reply to Re: Help requested to find the cause of an "uninitialized value" message
in thread Help requested to find the cause of an "uninitialized value" message
$socket = socketpair($child_fh, $parent_fh, .....); $child_fh -> autoflush(); $parent_fh -> autoflush(); $pid = fork(); ....
%INFO will always be populated ... it will never be null.while(1) { my %INFO = (); .... stuff-which-populates-%INFO ... my $dumped = Dumper(\%INFO); print $parent_fh ":MSG:${dumped}:DONE:\n"; sleep 10; }
I make sure that the opening and closing framing text (:MSG: and :DONE:) is present, just in case the data is transacted in dribs-and-drabs.state $collected; $num = read($child_fh, $buf, 1e6); if ($num) { $collected .= $buf; if ($collected =~ /:MSG:(.*):DONE:/s) { $dumper = $1; %info = %{ eval $dumper } $collected = ""; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Help requested to find the cause of an "uninitialized value" message
by haukex (Archbishop) on Jan 25, 2022 at 08:37 UTC | |
by andyok (Novice) on Jan 25, 2022 at 13:52 UTC | |
by Marshall (Canon) on Jan 29, 2022 at 17:58 UTC | |
|
Re^3: Help requested to find the cause of an "uninitialized value" message
by Marshall (Canon) on Jan 27, 2022 at 01:47 UTC |