beavis69 has asked for the wisdom of the Perl Monks concerning the following question:
If i remove the comment for use Schedule::Cron it doesnt work anymore !#!/usr/bin/perl -w use strict; #use Schedule::Cron; use Net::Ifconfig::Wrapper; my $mask=my $ip="0.0.0.0"; # get info for all interfaces my $Info = Net::Ifconfig::Wrapper::Ifconfig('list', '', '', ''); # get info for my interfaces eval { ($ip, $mask) = %{$Info->{"eth0"}{'inet'}}; }; warn $@ if $@; print "net::ifconfig eth0 addr is $ip\n";
and with the comment runs like a charmCan't use an undefined value as a HASH reference at ./test.pl line 15. net::ifconfig eth0 addr is 0.0.0.0
anyone a clue ? Thanksnet::ifconfig eth0 addr is 192.168.0.1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange problem with use
by davido (Cardinal) on Oct 17, 2003 at 17:48 UTC | |
by jmanning2k (Pilgrim) on Oct 17, 2003 at 19:04 UTC | |
by beavis69 (Initiate) on Oct 17, 2003 at 19:17 UTC | |
by beavis69 (Initiate) on Oct 18, 2003 at 10:08 UTC | |
by beavis69 (Initiate) on Oct 17, 2003 at 18:39 UTC | |
|
Re: Strange problem with use
by diotalevi (Canon) on Oct 17, 2003 at 17:47 UTC | |
by beavis69 (Initiate) on Oct 17, 2003 at 17:58 UTC |