RE: Unable to install Net::IP

2014-12-02 Thread zac
, LLC Original Message Subject: Re: Unable to install Net::IP From: John SJ Anderson <geneh...@genehack.org> Date: Tue, December 02, 2014 3:54 pm To: z...@psoftulsa.com, Perl Beginners <beginners@perl.org> Whenever you have a module installation fail, your first step should be to ask:

Re: Unable to install Net::IP

2014-12-02 Thread John SJ Anderson
Whenever you have a module installation fail, your first step should be to ask: is it failing for other people? Results of CPAN Testers (which is basically a distributed testing network) are available on the dist's MetaCPAN page. For Net::IP, that's here: https://metacpan.org/p

Re: Unable to install Net::IP

2014-12-02 Thread Brandon McCaig
On Tue, Dec 2, 2014 at 5:17 PM, wrote: > Hi, Hello, > I'm unable to find information on this issue. Whenever I try to install > Net::IP (to do a simple DHCP configuration file that will make IP address > reservations DNS files that will do forward and reverse lookups)

Unable to install Net::IP

2014-12-02 Thread zac
Hi,I'm unable to find information on this issue.  Whenever I try to install Net::IP (to do a simple DHCP configuration file that will make IP address reservations DNS files that will do forward and reverse lookups) it gives me the following results:root@SERVER:~# cpan -i Net::IPReading &

Re: converting ip regex to iprange

2014-05-28 Thread Mike
Maybe this module here? http://search.cpan.org/~mrsam/Net-CIDR-0.11/CIDR.pm On 5/28/14, 3:08 AM, Agnello George wrote: Hi I have about 300 + ip regex in my apache file like this 11\.45\.3[2-9]\..*$ ^11\.45\.4[0-9]\..*$ ^11\.45\.5[0-9]\..*$ I have to convert like this into CIDR

converting ip regex to iprange

2014-05-28 Thread Agnello George
Hi I have about 300 + ip regex in my apache file like this 11\.45\.3[2-9]\..*$ ^11\.45\.4[0-9]\..*$ ^11\.45\.5[0-9]\..*$ I have to convert like this into CIDR . · 11.45.32.0/21 · 11.45.40.0/21 · 11.45.48.0/23 · 11.45.50.0/21 11.45.58.0/23 is there a

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 01:44 PM, Terry Shepherd wrote: I like the idea of it being in our zone. Yes, I am running bind - can I hire you to help me configure the server for this? I think I can do it, but it looks like you have done this before already. Yes, I'd be glad to. Let's go off-list and set

Re: Updating my IP address in real time

2012-05-03 Thread Terry Shepherd
On Thu, May 3, 2012 at 1:35 PM, Lawrence Statton wrote: > On 05/03/2012 01:02 PM, Terry Shepherd wrote: > >> Wow. >> >> Thanks for the fast response. This is amazing. >> >> > You're welcome. I'm pretty sure on this list, the custom is not to > top-post. > > > Sorry. Getting the hang of this.

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 01:02 PM, Terry Shepherd wrote: Wow. Thanks for the fast response. This is amazing. You're welcome. I'm pretty sure on this list, the custom is not to top-post. No, I did not work for that station. I am in San francisco and was in elementary school during the 80s. "You

Re: Updating my IP address in real time

2012-05-03 Thread Uri Guttman
On 05/03/2012 01:25 PM, Terry Shepherd wrote: For a project at work, I need to have my development machine here at my house reachable via a name. I don't have static IP from my ISP (they offer it, but it's an expensive add-on). I have the router configured so that if you go to http:/

Re: Updating my IP address in real time

2012-05-03 Thread Terry Shepherd
:25 PM, Terry Shepherd wrote: >> >> For a project at work, I need to have my development machine here at >> my house reachable via a name. >> >> I don't have static IP from my ISP (they offer it, but it's an >> expensive add-on). >> >> I have

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 12:25 PM, Terry Shepherd wrote: For a project at work, I need to have my development machine here at my house reachable via a name. I don't have static IP from my ISP (they offer it, but it's an expensive add-on). I have the router configured so that if you go to http:/

Re: Updating my IP address in real time

2012-05-03 Thread Leopoldo Caballero
eed to have my development machine here at > my house reachable via a name. > > I don't have static IP from my ISP (they offer it, but it's an > expensive add-on). > > I have the router configured so that if you go to > http://205.178.x../mypage you get to my server,

Updating my IP address in real time

2012-05-03 Thread Terry Shepherd
For a project at work, I need to have my development machine here at my house reachable via a name. I don't have static IP from my ISP (they offer it, but it's an expensive add-on). I have the router configured so that if you go to http://205.178.x../mypage you get to my server, but

Re: regular expression for email id and IP address

2011-04-09 Thread Rob Dixon
On 09/04/2011 21:30, Olof Johansson wrote: On 2011-04-10 01:40 +0530, Sunita Rani Pradhan wrote: You are right. Thanks for pointing out. Can you help me getting it correct ? Somebody already mentioned Regex::Common. Use the same module for email addresses: use Regexp::Common qw/ net Emai

Re: regular expression for email id and IP address

2011-04-09 Thread Olof Johansson
On 2011-04-10 01:40 +0530, Sunita Rani Pradhan wrote: > Hi Johan s/Johan/Olof/, but who keeps score? > You are right. Thanks for pointing out . Can you help me > getting it correct ? Somebody already mentioned Regex::Common. -- - Olof Johansson - www: http://www.stdlib.se/ -

RE: regular expression for email id and IP address

2011-04-09 Thread Sunita Rani Pradhan
Hi Johan You are right. Thanks for pointing out . Can you help me getting it correct ? Thanks Sunita -Original Message- From: Olof Johansson [mailto:o...@ethup.se] Sent: Sunday, April 10, 2011 12:13 AM To: beginners@perl.org Subject: Re: regular expression for email id and IP

Re: regular expression for email id and IP address

2011-04-09 Thread Olof Johansson
On 2011-04-09 23:53 +0530, Sunita Rani Pradhan wrote: > Yes it is matching 167.249.0.0 . But it's also matching things like "42". Feature? Read about quantifiers, and also about the precedence of |. -- - Olof Johansson - www: http://www.stdlib.se/ - {mail,xmpp}: o...@ethup.se - ir

Re: regular expression for email id and IP address

2011-04-09 Thread Brian Fraser
use Regexp::Common qw/ net /; $ip =~ /$RE{net}{IPv4}/;

RE: regular expression for email id and IP address

2011-04-09 Thread Sunita Rani Pradhan
Yes it is matching 167.249.0.0 . -Sunita -Original Message- From: Jim Gibson [mailto:jimsgib...@gmail.com] Sent: Saturday, April 09, 2011 11:50 PM To: Perl Beginners Subject: Re: regular expression for email id and IP address At 11:42 PM +0530 4/9/11, Sunita Rani Pradhan wrote: >Hi

Re: regular expression for email id and IP address

2011-04-09 Thread Jim Gibson
to verify correct IP address : print $ipadd if ($ipadd =~ /^([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])|([1-2][0- 5][0-5])\.([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])|( [1-2][0-5][0-5])/); It is working as per my input . Please let me know if it correct or not .

regular expression for email id and IP address

2011-04-09 Thread Sunita Rani Pradhan
Hi All 1. Can anybody guide me to write a regular expression to verify correct Email address ? 2. I have written a regular expression to verify correct IP address : print $ipadd if ($ipadd =~ /^([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])|([1

Re: ip address substitution

2011-03-17 Thread Rob Dixon
On 16/03/2011 15:08, Shawn H Corey wrote: On 11-03-16 11:05 AM, John W. Krahn wrote: Jim wrote: $old_ip_address = "1.2.3.4"; $new_ip_address = "5.6.7.8" $old_ip_address_regexp = $old_ip_address; $old_ip_address_regexp =~ s/\./\\./ig; $read_line =~ s/(\D*)$old_ip_address_regexp(\D*)/$1$new_ip_ad

Re: ip address substitution

2011-03-16 Thread Brian Fraser
/x does exactly what you think it does; It's "free form" style, where any non-escaped whitespace is ignored. See perlretut[0], perlop[1], and perlre[2]. (?http://perldoc.perl.org/perlretut.html [1] http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators [2] http://perldoc.perl.org/perlre.h

Re: ip address substitution

2011-03-16 Thread Shawn H Corey
On 11-03-16 11:05 AM, John W. Krahn wrote: Jim wrote: $old_ip_address = "1.2.3.4"; $new_ip_address = "5.6.7.8" $old_ip_address_regexp = $old_ip_address; $old_ip_address_regexp =~ s/\./\\./ig; $read_line =~ s/(\D*)$old_ip_address_regexp(\D*)/$1$new_ip_address$2/ig; (\D*) won't work because it c

Re: ip address substitution

2011-03-16 Thread John W. Krahn
Jim wrote: I propose the following code will properly take the variable $read_line and substitute $new_ip_address for all occurrences of $old_ip_address. Basically the snippet of code is from some software that will update a set of old ip addresses with new ip addresses within a file. Can anyone

Re: ip address substitution

2011-03-16 Thread Shawn H Corey
On 11-03-16 10:29 AM, Jim wrote: $old_ip_address_regexp = $old_ip_address; $old_ip_address_regexp =~ s/\./\\./ig; $old_ip_address_regexp = quotemeta( $old_ip_address ); See `perldoc -f quotemeta`. -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of understand

ip address substitution

2011-03-16 Thread Jim
I propose the following code will properly take the variable $read_line and substitute $new_ip_address for all occurrences of $old_ip_address. Basically the snippet of code is from some software that will update a set of old ip addresses with new ip addresses within a file. Can anyone find any

Re: AW: Perl get host's IP

2010-04-14 Thread Peng YH
Thomas Bätzler: asked: Is there a general way to get linux OS's bound ip addresses? for example, the IP on eth0, eth1 etc. Thanks. http://search.cpan.org/~lds/IO-Interface-1.05/Interface.pm could be a "good enough" solution for you. Thanks. Looks a good solution for my

AW: Perl get host's IP

2010-04-14 Thread Thomas Bätzler
asked: > Is there a general way to get linux OS's bound ip addresses? for > example, the IP on eth0, eth1 etc. Thanks. http://search.cpan.org/~lds/IO-Interface-1.05/Interface.pm could be a "good enough" solution for you. I say "good enough" since it gives you

Perl get host's IP

2010-04-13 Thread Peng YH
Is there a general way to get linux OS's bound ip addresses? for example, the IP on eth0, eth1 etc. Thanks.

Re: Basic Domain and IP Info

2010-01-17 Thread Mike Blezien
- Original Message - From: "Jeff Peng" To: "Mike Blezien" Cc: "Perl List" Sent: Sunday, January 17, 2010 8:05 PM Subject: Re: Basic Domain and IP Info 在 2010-01-17日的 11:16 -0600,Mike Blezien写道: Hello, I've been looking for some basic domain/IP i

Re: Basic Domain and IP Info

2010-01-17 Thread Jeff Peng
在 2010-01-17日的 11:16 -0600,Mike Blezien写道: > Hello, > > I've been looking for some basic domain/IP info that we can generate for > domain/IP addresses entered from a form. I've been searching CPAN without > much > luck, but maybe looking in the wrong places. Wha

Basic Domain and IP Info

2010-01-17 Thread Mike Blezien
Hello, I've been looking for some basic domain/IP info that we can generate for domain/IP addresses entered from a form. I've been searching CPAN without much luck, but maybe looking in the wrong places. What I like to do is obtain the following information for the domain/IP addre

Re: Want to write a script to note specific IP addresses.

2009-10-22 Thread John W. Krahn
hongyi.z...@gmail.com wrote: On Thursday, October 22, 2009 at 15:08, mrdanwal...@gmail.com wrote: 2009/10/19 Hongyi Zhao : I want to write a script to note specific IP Â addresses by appending the corresponding location informations. Â For I suggest you take a look at Geo::IP [0]. I've

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread John W. Krahn
r Socket length in inet_ntoa" ??? perldoc -f gethostbyname [ SNIP ] In the opposite way, to resolve a hostname to the IP address you can write this: use Socket; $packed_ip = gethostbyname("www.perl.org"); if (defined $packed_ip

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Shlomi Fish
Hi Anant! Here's some review of your code: On Thursday 22 Oct 2009 12:23:55 Anant Gupta wrote: > I wrote > > #!usr/bin/perl > use Socket; 1. You should add "use strict;" and "use warnings;" at the top of every file. Writing programs without them is dangerous. Probably the only instance where

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Philip Potter
2009/10/22 Anant Gupta : > Thank you. > I just used "use strict" and "use warnings" and it worked. > Even now I cant figure out what difference can this make :) > > Thank you for tour time If it helps, I have no idea either :) Philip -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Anant Gupta
showing an error > >> > "Bad argument length for Socket length in inet_ntoa" ??? > >> > Help > >> > >> When I run your code, I don't get any such error. Are you sure that > >> this is the code that produced the error? > >> > >> Further: > >> > $dotted-inet_ntoa($packed); > >> > >> did you mean > >> $dotted = inet_ntoa($packed); > >> (you used a - minus sign instead of a = assignment operator) > >> > >> > print "DOtted Address is $packed"; > >> > >> did you mean > >> print "Dotted Address is $dotted\n"; > >> you were printing the wrong variable. > >> > >> With these changes, I get a dotted ip address which matches the output > >> of "host www.google.com" > >> > >> Philip > > > > >

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Philip Potter
($packed); >> >> did you mean >>  $dotted = inet_ntoa($packed); >> (you used a - minus sign instead of a = assignment operator) >> >> > print "DOtted Address is $packed"; >> >> did you mean >>  print "Dotted Address is $dotted\n"; >> you were printing the wrong variable. >> >> With these changes, I get a dotted ip address which matches the output >> of "host www.google.com" >> >> Philip > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Anant Gupta
cked); > > did you mean > $dotted = inet_ntoa($packed); > (you used a - minus sign instead of a = assignment operator) > > > print "DOtted Address is $packed"; > > did you mean > print "Dotted Address is $dotted\n"; > you were printing the wrong variable. > > With these changes, I get a dotted ip address which matches the output > of "host www.google.com" > > Philip >

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Philip Potter
($packed); (you used a - minus sign instead of a = assignment operator) > print "DOtted Address is $packed"; did you mean print "Dotted Address is $dotted\n"; you were printing the wrong variable. With these changes, I get a dotted ip address which matches the output of &

Convert Site Name to Dotted IP Address

2009-10-22 Thread Anant Gupta
I wrote #!usr/bin/perl use Socket; use constant ADDR => 'www.google.com'; my $name=shift || ADDR; $packed=gethostbyname($name); $dotted-inet_ntoa($packed); print "DOtted Address is $packed"; but it is showing an error "Bad argument length for Socket length in inet_ntoa" ??? Help

Re: Want to write a script to note specific IP addresses.

2009-10-22 Thread hongyi . zhao
On Thursday, October 22, 2009 at 15:08, mrdanwal...@gmail.com wrote: > 2009/10/19 Hongyi Zhao : >> I want to write a script to note specific IP >>  addresses by appending the corresponding location informations.  For > I suggest you take a look at Geo::IP [0]. I've used it

Re: Want to write a script to note specific IP addresses.

2009-10-22 Thread Dan Wallis
2009/10/19 Hongyi Zhao : > I want to write a script to note specific IP >  addresses by appending the corresponding location informations.  For I suggest you take a look at Geo::IP [0]. I've used it quite a few times in the past for similar tasks to what you're describing. I

Re: Want to write a script to note specific IP addresses.

2009-10-20 Thread Shawn H Corey
Hongyi Zhao wrote: > Hi all, > > I want to write a script to note specific IP > addresses by appending the corresponding location informations. For > detail, I describe my issue as follows: > > Suppose I have two files, the first file is used to store the specific >

Want to write a script to note specific IP addresses.

2009-10-20 Thread Hongyi Zhao
Hi all, I want to write a script to note specific IP addresses by appending the corresponding location informations. For detail, I describe my issue as follows: Suppose I have two files, the first file is used to store the specific IP addresses which I want to note, and the second file is

Re: TCP/IP client

2009-06-10 Thread Chas. Owens
eate socket: $!\n"; while (my ($sock, $addr) = $server->accept){ my ($port, $ip) = sockaddr_in $addr; my $ipnum = inet_ntoa $ip; print "\n\nServer connected with a client from: [$ipnum] \n"; my $header_bytes = sysread $sock

AW: TCP/IP client

2009-06-09 Thread Thomas Bätzler
Octavian Rasnita wrote: > I was hoping that I could find a module that allows me to do something > like: > > use The::Module; > > my $client = The::Module->new(PeerAddr => 'localhost:9000'); [...] Use Net::Telnet. From ist description: "You're not familiar with sockets and you want a simple wa

Re: TCP/IP client

2009-06-09 Thread Octavian Rasnita
From: "Chas. Owens" 2009/6/9 Octavian Râşniţă : Hi, I need to create a TCP/IP client that connects to a server which accepts messages made from 3 parts: - a static start string of 9 bytes; - the body (that can have a variable length) - a static string of 9 bytes. ...and then

Re: TCP/IP client

2009-06-09 Thread Chas. Owens
2009/6/9 Octavian Râşniţă : > Hi, > > I need to create a TCP/IP client that connects to a server which accepts > messages made from 3 parts: > - a static start string of 9 bytes; > - the body (that can have a variable length) > - a static string of 9 bytes. > > ...and th

TCP/IP client

2009-06-09 Thread Octavian Râşniţă
Hi, I need to create a TCP/IP client that connects to a server which accepts messages made from 3 parts: - a static start string of 9 bytes; - the body (that can have a variable length) - a static string of 9 bytes. ...and then it gives a response that I need to get. I've searched the

Re: how to calc ip range?

2009-03-19 Thread practicalperl
Thanks Chas. I have got it correctly. On Thu, Mar 19, 2009 at 9:54 PM, Chas. Owens wrote: > > Take a look at Net::CIDR::Set[1] and the other modules[2] that work > with CIDR notation. > #!/usr/bin/perl > > use strict; > use warnings; > > use Net::CIDR::Set; > > my $network1 = Net::CIDR::Set->new

Re: how to calc ip range?

2009-03-19 Thread Chas. Owens
On Thu, Mar 19, 2009 at 05:27, wrote: > I don't know how to calculate an IP range. > for example, > > 202.102.128.0/17  -  202.102.192.0/19  = ? > > I mean the first range excludes the second, and what will be gotten. snip Take a look at Net::CIDR::Set[1] and the other mo

how to calc ip range?

2009-03-19 Thread practicalperl
I don't know how to calculate an IP range. for example, 202.102.128.0/17 - 202.102.192.0/19 = ? I mean the first range excludes the second, and what will be gotten. please help, thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginn

get sending ip adres with IO::Socket::INET

2009-03-08 Thread Bernard van de Koppel
Hi, I am trying to setup an netflow monitor with Net::Flow. This is working Oke, with the folowing code: use strict; use Net::Flow qw(decode) ; use IO::Socket::INET; my $receive_port = 9993 ; my $packet = undef ; my $TemplateArrayRef = undef ; my $sock = IO::Socket::INET->new( LocalPort =>$rece

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-11 Thread John W. Krahn
Chas. Owens wrote: On Mon, Nov 10, 2008 at 21:40, Rob Dixon <[EMAIL PROTECTED]> wrote: John W. Krahn wrote: Why not just: ipaddy=`awk '{ print $1 }' ipin.txt` But that still doesn't get you a comma-separated list. Erm, a Perl list? Rob Hey, if you throw an @ in front of ipaddy you get a P

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-11 Thread Chas. Owens
On Mon, Nov 10, 2008 at 21:40, Rob Dixon <[EMAIL PROTECTED]> wrote: > John W. Krahn wrote: >> >> Why not just: >> >> ipaddy=`awk '{ print $1 }' ipin.txt` >> >> But that still doesn't get you a comma-separated list. > > Erm, a Perl list? > > Rob Hey, if you throw an @ in front of ipaddy you get a P

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread Rob Dixon
John W. Krahn wrote: > > Why not just: > > ipaddy=`awk '{ print $1 }' ipin.txt` > > But that still doesn't get you a comma-separated list. Erm, a Perl list? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread Stewart Anderson
> From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: 10 November 2008 11:26 > To: Perl Beginners > Subject: Re: Using perl in a Bash-script to extract IP-addresses? > > Stewart Anderson wrote: > >> JC Janos wrote: > >>> > >>> I have a fil

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread John W. Krahn
Stewart Anderson wrote: JC Janos wrote: I have a file containing IP addresses & ranges, their negations, and comments. E.g., 1.1.1.1 # comment A 2.2.2.2/29 # comment B !3.3.3.3 # comment C !4.4.4.4/28 # comment D I need to extract those

RE: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread Stewart Anderson
> > JC Janos wrote: > > Hi, > > Hello, > > > I have a file containing IP addresses & ranges, their negations, and > > comments. E.g., > > > > 1.1.1.1 # comment A > > 2.2.2.2/29 # comment B > > !3.3.3.3 #

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-09 Thread John W. Krahn
JC Janos wrote: Hi, Hello, I have a file containing IP addresses & ranges, their negations, and comments. E.g., 1.1.1.1 # comment A 2.2.2.2/29 # comment B !3.3.3.3 # comment C !4.4.4.4/28 # comment D I need to extract those IPs &

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-09 Thread Telemachus
urrent problems. That said, Perl could do what you need to do here pretty easily. In the version below, I stuck the IP addresses into the same file (in the DATA section) for convenience, but it wouldn't be any harder if they were in a separate file. So maybe that's some incentive to lea

Using perl in a Bash-script to extract IP-addresses?

2008-11-09 Thread JC Janos
Hi, I have a file containing IP addresses & ranges, their negations, and comments. E.g., 1.1.1.1 # comment A 2.2.2.2/29 # comment B !3.3.3.3 # comment C !4.4.4.4/28 # comment D I need to extract those IPs & ranges, rearrange them into

Re: translate IP mask

2008-10-17 Thread Rob Dixon
Sandy lone wrote: > On Thu, Oct 16, 2008 at 7:57 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > >> print "$ip/" . unpack "%32b*", inet_aton $mask; >> ' > > Thanks, that's the cool solution. I think you (Sandy) ought to explain to us w

Re: translate IP mask

2008-10-16 Thread Sandy lone
On Thu, Oct 16, 2008 at 7:57 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > print "$ip/" . unpack "%32b*", inet_aton $mask; > ' Thanks, that's the cool solution. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: translate IP mask

2008-10-16 Thread Deviloper
Net::Netmask does such things, too. "John W. Krahn" <[EMAIL PROTECTED]> hat am 16. Oktober 2008 um 12:57 geschrieben: > Sandy lone wrote: > > I need to translate an IP addr with its mask from this form: > > > > 192.168.1.30/255.255.255.0 > > > &g

Re: translate IP mask

2008-10-16 Thread John W. Krahn
Sandy lone wrote: I need to translate an IP addr with its mask from this form: 192.168.1.30/255.255.255.0 to this one: 192.168.1.30/24 One way to do it: $ perl -le' use Socket; my $stuff = "192.168.1.30/255.255.255.0"; my ( $ip, $mask ) = split /\//, $stuff; print "

Re: translate IP mask

2008-10-16 Thread Chas. Owens
On Thu, Oct 16, 2008 at 05:44, Sandy lone <[EMAIL PROTECTED]> wrote: > I need to translate an IP addr with its mask from this form: > > 192.168.1.30/255.255.255.0 > > to this one: > > 192.168.1.30/24 > > > which module/method is right to use? Thanks. A quick s

translate IP mask

2008-10-16 Thread Sandy lone
I need to translate an IP addr with its mask from this form: 192.168.1.30/255.255.255.0 to this one: 192.168.1.30/24 which module/method is right to use? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: get external IP address

2008-08-22 Thread John W. Krahn
William wrote: Hello, Hello, if I want to make an application to allow user find their WAN IP address, what are the available options in Perl ? I have searched around. perldoc -q "How do I find out my hostname, domainname, or IP address?" John -- Perl isn't a toolbox, but

get external IP address

2008-08-22 Thread William
Hello, if I want to make an application to allow user find their WAN IP address, what are the available options in Perl ? I have searched around. Thank you, William New Email names for you! Get the Email name you've always wanted on the new @ymail and @rocketmail. Hurry b

Re: Filtered out a IP in a URL

2008-06-19 Thread Jay Savage
On Thu, Jun 19, 2008 at 1:20 AM, luke devon <[EMAIL PROTECTED]> wrote: > Dear Friends, > > In squid URL-rewriting , I wanted to add some third party > parameters to the URL and wanted to filtered out IP which assigned for > client ( Client -IP ). Rather than having a shell s

Filtered out a IP in a URL

2008-06-18 Thread luke devon
Dear Friends, In squid URL-rewriting , I wanted to add some third party parameters to the URL and wanted to filtered out IP which assigned for client ( Client -IP ). Rather than having a shell script , I supposed to do a perl script for that purpose . But it seems bit tricky, How can I do this

RE: Looking for example of how to keep an FTP processing running if the Ip Address is down or unavailable

2008-03-24 Thread Wagner, David --- Senior Programmer Analyst --- WGO
> -Original Message- > From: Chas. Owens [mailto:[EMAIL PROTECTED] > Sent: Monday, March 24, 2008 11:42 > To: Wagner, David --- Senior Programmer Analyst --- WGO > Cc: Perl Beginners > Subject: Re: Looking for example of how to keep an FTP > processing running if t

Re: Looking for example of how to keep an FTP processing running if the Ip Address is down or unavailable

2008-03-24 Thread Chas. Owens
On Mon, Mar 24, 2008 at 2:25 PM, Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: > I have a polling process that runs 24x7 ( internal site ) and for the > most part has no problems except that they shutdown the the internal > site every three or four weeks and my pr

Re: Looking for example of how to keep an FTP processing running if the Ip Address is down or unavailable

2008-03-24 Thread yitzle
1) Can you set a really long timeout? 2) When I asked about doing something similar with Mechanize->get(), someone suggested wrapping the call in an eval block and testing the exit status of the function call. Or something like that. Would that approach work here? -- To unsubscribe, e-mail: [EMAI

Looking for example of how to keep an FTP processing running if the Ip Address is down or unavailable

2008-03-24 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I have a polling process that runs 24x7 ( internal site ) and for the most part has no problems except that they shutdown the the internal site every three or four weeks and my process then dies. I have a simple setup: $MyFtp = Net::FTP->new($GlblInfo{ipaddr}, Debug => 1); $MyFtp

Re: Perl script to lookup IP addresses

2008-01-27 Thread mkwong8888
You can use the Geo::IP2Location Perl API to query the geolocation information from IP2Location. They provide IPv6 database for free. Please visit http://www.ip2location.com for more information. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] htt

Caching wildcard ip addresses

2008-01-23 Thread Jim Hill
Hi all I have dos-style wildcard ip addresses and some ip address ranges held in a text file, one per line like this ... 127.0.0.0/8 10.0.0.0-10.0.1.255 192.168.1.* 172.?.*.* 10.0.1?.* ... which I'm trying to convert into cidr notation to use with Net::CIDR to create a lookup cache. The

Re: Perl script to lookup IP addresses

2008-01-21 Thread pallav
Thank you very much for the information. I will look into this. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Perl script to lookup IP addresses

2008-01-21 Thread Chas. Owens
> complete with various APIs, one being perl. I believe akamai has > another but that one is quite expensive but does offer a web services > functionality the others don't and is updated quite frequently and more > accurate. snip Just to clarify, Geo::IP is MaxMind's interface, the

RE: Perl script to lookup IP addresses

2008-01-21 Thread Durick, JD
g >Subject: Re: Perl script to lookup IP addresses > >On Jan 21, 2008 2:38 AM, pallav <[EMAIL PROTECTED]> wrote: >> I have some research tools that I make available for download. When a >> person downloads it, I record the IP address. >> >> I wanted to know

Re: Perl script to lookup IP addresses

2008-01-21 Thread Chas. Owens
On Jan 21, 2008 2:38 AM, pallav <[EMAIL PROTECTED]> wrote: > I have some research tools that I make available for download. When a > person downloads it, I record the IP address. > > I wanted to know if perl has some functions/utilities where I can > supply these IP address

Perl script to lookup IP addresses

2008-01-21 Thread pallav
I have some research tools that I make available for download. When a person downloads it, I record the IP address. I wanted to know if perl has some functions/utilities where I can supply these IP address to get an approximate location of the IP address. Most of the downloads are usually from

Re: find external ip address

2007-11-26 Thread Celejar
On Sat, 24 Nov 2007 16:38:21 +0100 "Jenda Krynicky" <[EMAIL PROTECTED]> wrote: > From: doubleHelix <[EMAIL PROTECTED]> > > ok i know how i can find my INERNAL ip address in a script with perl: > > > > use Socket; > > print inet_nt

Re: find external ip address

2007-11-24 Thread Jenda Krynicky
From: doubleHelix <[EMAIL PROTECTED]> > ok i know how i can find my INERNAL ip address in a script with perl: > > use Socket; > print inet_ntoa(inet_aton("")) ."\n"; > > but how would I find my EXTERNAL ip address? Define external

Re: find external ip address

2007-11-24 Thread Tom Phoenix
On 11/23/07, doubleHelix <[EMAIL PROTECTED]> wrote: > but how would I find my EXTERNAL ip address? If there's an IP address at which routers send traffic to your machine, your machine doesn't intrinsically know what it is. You generally have to ask some program such as i

find external ip address

2007-11-23 Thread doubleHelix
ok i know how i can find my INERNAL ip address in a script with perl: use Socket; print inet_ntoa(inet_aton("")) ."\n"; but how would I find my EXTERNAL ip address? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: help on ip addr

2007-10-29 Thread Matthew Whipple
lists user wrote: > Hello, > > I want to do the things below: > > a) get all binded IPs on a redhat linux os.there are maybe more than > one IP,like eth0,eth1,eth0:1 etc. > > b) for each IP,I need to know if it's a private network address (like > 192.168.0.1) or a

Re: help on ip addr

2007-10-27 Thread John W . Krahn
On Friday 26 October 2007 22:13, lists user wrote: > Hello, Hello, > I want to do the things below: > > a) get all binded IPs on a redhat linux os.there are maybe more than > one IP,like eth0,eth1,eth0:1 etc. Just Ethernet NICs? What about Token Ring? DECNet? Wifi? IP6 tunne

Re: help on ip addr

2007-10-27 Thread tfe
User) wrote: > Hello, > > I want to do the things below: > > a) get all binded IPs on a redhat linux os.there are maybe more than > one IP,like eth0,eth1,eth0:1 etc. > > b) for each IP,I need to know if it's a private network address (like > 192.168.0.1) or a public n

help on ip addr

2007-10-26 Thread lists user
Hello, I want to do the things below: a) get all binded IPs on a redhat linux os.there are maybe more than one IP,like eth0,eth1,eth0:1 etc. b) for each IP,I need to know if it's a private network address (like 192.168.0.1) or a public network address. for the first problem I can

Re: Search for IP address and delete from file

2007-10-18 Thread Matthew Whipple
> > Good point, bad example (although natural continuation of previous > discussion). Most programs won't output leading 0's in IP addresses > (and then it likely wouldn't match any since it would be > 192.168.000.000), but there are many other possibilities of any number &g

Re: Search for IP address and delete from file

2007-10-18 Thread Matthew Whipple
168.0.0 can also match a line with 192.168.010 in > it. See also the -F option of grep. > > -- > Affijn, Ruud > > "Gewoon is een tijger." > Good point, bad example (although natural continuation of previous discussion). Most programs won't output leading 0&#

Re: Search for IP address and delete from file

2007-10-18 Thread Dr.Ruud
yitzle schreef: > If you are on a Linux machine, it might just be easier > to use the grep command with a shell script. > > FILE_NAME="./log" > TMP_FILE="./tmp" > IP_TO_REMOVE="192.168.0.0|192.168.0.255" > > COUNT=`grep $IP_TO_REMOVE $FILE_NAME | wc -l` > echo "The IPs occur $COUNT times" > > grep

Re: Search for IP address and delete from file

2007-10-17 Thread Phillip Gonzalez
FreeBSD, and that's actually what I ended up doing basically using cat and grep -v. Thanks, On Oct 17, 2007, at 9:14 PM, yitzle wrote: If you are on a Linux machine, it might just be easier to use the grep command with a shell script. FILE_NAME="./log" TMP_FILE="./tmp" IP_TO_REMOVE="192.16

Re: Search for IP address and delete from file

2007-10-17 Thread yitzle
If you are on a Linux machine, it might just be easier to use the grep command with a shell script. FILE_NAME="./log" TMP_FILE="./tmp" IP_TO_REMOVE="192.168.0.0|192.168.0.255" COUNT=`grep $IP_TO_REMOVE $FILE_NAME | wc -l` echo "The IPs occur $COUNT times" grep -v $IP_TO_REMOVE $FILE_NAME > $TMP_

Re: Search for IP address and delete from file

2007-10-17 Thread Jeff Pang
On 10/18/07, Phillip Gonzalez <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to search a .txt file for matching ip addresses. I then want to > delete those ip >addresses. > The better way for finding an IP from given list is to use Net::IP module from CPAN ra

  1   2   3   4   5   >