The misspelling in the print statement doesn't make any difference. It's not parsed by perl, just a string output. Doesn't make any difference in program execution at all.

If it helps, I get the exact same error. Once I use Schedule::Cron, $Info comes back as undefined. Must be something that conflicts between those two modules.

The eval doesn't help, btw. I assume you put it in to help debug, but the problem is prior to these lines.

I'll keep trying things out, and let you know if I have any luck.

Update: It seems that use'ing Schedule::Cron sets $SIG{CHLD}. This seems to be interfering with the Ifconfig module. I'd say it's a bug in the ifconfig module, the Schedule::Cron module, or both -- but here's a workaround.

Save the old value of $SIG{CHLD}, then call Ifconfig, then restore $SIG{CHLD}. Or, get rid of the use line, and 'require' it below this call.

my $oldsigchld = $SIG{CHLD}; $SIG{CHLD} = 'DEFAULT'; # get info for all interfaces + my $Info = Net::Ifconfig::Wrapper::Ifconfig('list', '', '', ''); $SIG{CHLD} = $oldsigchld if(defined $oldsigchld);
or
# get info for all interfaces + my $Info = Net::Ifconfig::Wrapper::Ifconfig('list', '', '', ''); require Schedule::Cron;
If I do either of those things, it works fine. ;-)

~J


In reply to Re: Re: Strange problem with use by jmanning2k
in thread Strange problem with use by beavis69

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.