in reply to Out of memory
Hello wrkrbeee,
When I added use strict to your code, I got a screenful of error messages. The first,
Global symbol "$ua" requires explicit package name at ...
highlights what looks like a serious problem: namely, that the $ua accessed within sub get_http is not the lexical variable declared below the sub, but rather an unrelated package global (which is uninitialised).
Please, add:
use strict; use warnings;
to the head of your script and fix the resultant errors before proceeding.
Update: Ok, sub get_http isn’t actually called in the code shown. But when it is called, in the larger programme, you want it to work correctly, right? Why make things harder for yourself by working without a safety net?
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Out of memory
by Anonymous Monk on Jan 15, 2015 at 22:31 UTC | |
|
Re^2: Out of memory
by wrkrbeee (Scribe) on Jan 15, 2015 at 15:21 UTC | |
by RonW (Parson) on Jan 15, 2015 at 23:58 UTC |