Re: ip4 check

2004-12-08 Thread Ing. Branislav Gerzo
[EMAIL PROTECTED] [D], on Tuesday, December 7, 2004 at 11:49
(-0500) thinks about:

D Did anyone have any ideas I only received one response!  Thanks

what was bad on my response ? Maybe you wanted whole code...here it
is:

use IO::Socket;
my $ip = '192.168.1.1';
$ip_ok =  inet_aton($ip) || die $ip is not IP!\n;

it is IP, only if $ip is in ###.###.###.### format, '127.0.0.1/24'
doesn't work here.

-- 

 ...m8s, cu l8r, Brano.

[Don't say during sex:  Is this a sin too?]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: ip4 check

2004-12-07 Thread Bob Showalter
[EMAIL PROTECTED] wrote:
 if ( $var = ipv4_checkip ($var)) {

Should be ipv4_chkip, not ipv4_checkip

You should contact the module author to see if he's interested in improving
the error handling for this kind of thing...

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: ip4 check

2004-12-07 Thread Lawrence Statton
 --=_alternative 005C6D8D85256F63_=
 Content-Type: text/plain; charset=us-ascii
 
 All, 
 
 Did anyone have any ideas I only received one response!  Thanks
 
 I have having issues using this module I installed.  The module is 
 Net::IPv4Addr.
 
 Here is my code
 
 use strict;
 use warnings;
 use diagnostics;
 use Net::IPv4Addr qw( :all );
 
 my $var = 23.23.109.103;
 print $var\n;
 
 #if ($var =~ m/^\d+$/) {
 #if ($var !~ /\D/) {
 
 if ( $var = ipv4_checkip ($var)) {
 print your variable is a number $var\n;
 } else {
 print number $var is not a number\n;
 }

1) Read perldoc Net::IPv4Addr

2) change ipv4_checkip to ipv4_chkip 



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
sort them into the correct order.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: ip4 check

2004-12-07 Thread DBSMITH
ok thanks!






Lawrence Statton [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
12/07/2004 12:08 PM
Please respond to Lawrence Statton

 
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: ip4 check


 --=_alternative 005C6D8D85256F63_=
 Content-Type: text/plain; charset=us-ascii
 
 All, 
 
 Did anyone have any ideas I only received one response!  Thanks
 
 I have having issues using this module I installed.  The module is 
 Net::IPv4Addr.
 
 Here is my code
 
 use strict;
 use warnings;
 use diagnostics;
 use Net::IPv4Addr qw( :all );
 
 my $var = 23.23.109.103;
 print $var\n;
 
 #if ($var =~ m/^\d+$/) {
 #if ($var !~ /\D/) {
 
 if ( $var = ipv4_checkip ($var)) {
 print your variable is a number $var\n;
 } else {
 print number $var is not a number\n;
 }

1) Read perldoc Net::IPv4Addr

2) change ipv4_checkip to ipv4_chkip 



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
 Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
sort them into the correct order.