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 I need to
Actually you can do this with ddclient and a service like DynDNS.
Maybe you can put your somehost.mydomain.com in CNAME of
blabla.dyndns.org and configure ddclient to update the service for
blabla.dyndns.org
On Thu, May 3, 2012 at 12:25 PM, Terry Shepherd
terry.shepherd.94...@gmail.com wrote:
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
Wow.
Thanks for the fast response. This is amazing.
No, I did not work for that station. I am in San francisco and was in
elementary school during the 80s.
What does fqdn mean and what is the authoritave server?
On Thu, May 3, 2012 at 12:52 PM, Lawrence Statton lawre...@cluon.com
wrote:
On
the
solution you need. contact dyndns.com for a free dns name for your dhcp
(dynamic ip address). many routers (mine from verizon) actually have
built in support to update the dns servers at dyndns (they invented this
protocol). if you don't have the support, you can download a short perl
program from
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
On Thu, May 3, 2012 at 1:35 PM, Lawrence Statton lawre...@cluon.com 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.
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
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
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
.
I don't
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 All
use Regexp::Common qw/ net /;
$ip =~ /$RE{net}{IPv4}/;
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
- irc:
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
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/
-
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
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 =~
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
and replace part of it anyway. There's a great section about this on
Mastering Regular Expressions[1], 5.2.2. Matching an IP Address and
5.2.2.1. Know your context.
my $old_ip_address = 1.2.3.4;
my $new_ip_address = 5.6.7.8
$read_line =~ s/
(?![\w
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
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
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 can
, 1.2.3.4.5 is not a valid IP, but you'd match
and replace part of it anyway. There's a great section about this on
Mastering Regular Expressions[1], 5.2.2. Matching an IP Address and
5.2.2.1. Know your context.
my $old_ip_address = 1.2.3.4;
my $new_ip_address = 5.6.7.8
$read_line =~ s/
(?![\w
/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].
(?!) is a negative lookbehind; (?!) is a negative lookahead. Meanwhile,
(?=) is a positive lookbehind, and (?=) is a positive lookahead; They are
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
)
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
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
($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
ip address which matches the output
of host www.google.com
Philip
2009/10/22 Anant Gupta anantgupta...@gmail.com:
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:
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
they
???
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) {
$ip_address = inet_ntoa($packed_ip
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#39;ve always wanted on the new @ymail and @rocketmail.
Hurry before
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 a small machine
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);
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:
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
-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 the Ip Address is down
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_ntoa(inet_aton()) .\n;
but how would I find my EXTERNAL ip
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 ipconfig. Inquire in forums
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 ... it's not as simple as it may sound. One
definition
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/
mv $TMP_FILE $FILE_NAME
Be careful, the 192.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
On Fri, 2007-10-19 at 01:55 +0200, Dr.Ruud wrote:
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
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 -v $IP_TO_REMOVE
Hi,
I'm trying to search a .txt file for matching ip addresses. I then want to
delete those ip addresses.
So far I have opened the file where the ip list is and stored it in an array.
But How do I search the array for ip's?
Here's what I have so far:
#!/usr/bin/perl
Take a look at the grep function
http://perldoc.perl.org/functions/grep.html
Also of potential use is the qr// quote operator:
http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators
This lets you do:
my $ip_search = qr/$ip_string/;
my @lines_with_ip = grep /$ip_search/, @raw_data; # or
yitzle wrote:
Take a look at the grep function
http://perldoc.perl.org/functions/grep.html
Also of potential use is the qr// quote operator:
http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators
This lets you do:
my $ip_search = qr/$ip_string/;
my @lines_with_ip = grep
Matthew Whipple wrote:
yitzle wrote:
Take a look at the grep function
http://perldoc.perl.org/functions/grep.html
Also of potential use is the qr// quote operator:
http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators
This lets you do:
my $ip_search = qr/$ip_string/;
my
They have all been helpful.
Thanks,
On Oct 17, 2007, at 4:40 PM, Matthew Whipple wrote:
Matthew Whipple wrote:
yitzle wrote:
Take a look at the grep function
http://perldoc.perl.org/functions/grep.html
Also of potential use is the qr// quote operator:
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 rather than using regex I think.
--
To
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_FILE
mv
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
Danny wrote:
Hi list,
I am trying to get the ip address from each of my NIC's (only the ip
address) from ifconfig and then
mailing the addresses to a remote mailbox. The problem is that I am making
one BIG
stuff-up out of it and I am too embarrassed to post my script here
, 2006 8:52 AM
To: Perl-beginners
Subject: Re: Getting ip address
Danny wrote:
Hi list,
I am trying to get the ip address from each of my NIC's (only the ip
address) from ifconfig and then
mailing the addresses to a remote mailbox. The problem is that I am
making one BIG
stuff-up out
Hi list,
I am trying to get the ip address from each of my NIC's (only the ip address)
from ifconfig and then
mailing the addresses to a remote mailbox. The problem is that I am making one
BIG
stuff-up out of it and I am too embarrassed to post my script here. The more I
try, the harder
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
Danny wrote:
Hi list,
I am trying to get the ip address from each of my NIC's (only the ip address)
from ifconfig and then
mailing the addresses to a remote mailbox. The problem is that I am making
one BIG
stuff-up out of it and I am
I'm using the LWP, HTML::Parser, HTTP::Request::Common and other packages
retrieve some infromation from some web sites which require I have a certain
IP address. I'm using a VPN to connect to this network. How can I tell perl
to use the secondary IP address aquired by means of the VPN instead
I'm using the LWP, HTML::Parser, HTTP::Request::Common and other packages
retrieve some infromation from some web sites which require I have a certain
IP address. I'm using a VPN to connect to this network. How can I tell perl
to use the secondary IP address aquired by means of the VPN instead
180884579 imstrmcs08
180884580 imstrmcs09
180884581 imstrmcs10
Script:
# Properly formatting into an array
open(IPLIST, file) || die couldn't open the file;
while ($x = IPLIST)
{
chop $x;
@arr = split /\s+/,$x;
print @arr\n;
}
# Converting IP number to IP address
180884581 imstrmcs10
Script:
# Properly formatting into an array
open(IPLIST, file) || die couldn't open the file;
while ($x = IPLIST)
{
chop $x;
@arr = split /\s+/,$x;
print @arr\n;
}
# Converting IP number to IP address.
foreach $ipaddr {
$ip1 = int ($ipaddr / (256**3));
$ipaddr
imstrmcs09
180884581 imstrmcs10
Script:
# Properly formatting into an array
open(IPLIST, file) || die couldn't open the file;
while ($x = IPLIST)
{
chop $x;
@arr = split /\s+/,$x;
print @arr\n;
}
# Converting IP number to IP address.
foreach $ipaddr {
$ip1 = int ($ipaddr / (256**3
Hi all,
I an new to group and perl itself.
I need to find the IP address of the machines, which tries/does access my unix
server.
For eq if someone connect using ftp, telnet,ssh or anyother tool I need to know
the IP address of the user and the time when he connected.
Thank you all
DiGregorio, Dave wrote:
Help please, I am trying to get the IP address of the host PC into a perl
script. I tried using Gethostbyname() without success. I have a Bluetooth
adapter connected to this PC and when I ping host name it returns the IP
address of the BT adapter. Ipconfig shows the 2
: How to map IP address with country
Anish Kumar K. wrote:
Hi
Hello,
Is there any module in perl where I can Map the IP country with the
country..
Do you mean something like:
http://search.cpan.org/~nwetters/IP-Country-2.18/lib/IP/Country.pm
John
--
use Perl;
program
fulfillment
Hi
Is there any module in perl where I can Map the IP country with the country..
Thanks
Anish
Anish Kumar K. wrote:
Hi
Hello,
Is there any module in perl where I can Map the IP country with the country..
Do you mean something like:
http://search.cpan.org/~nwetters/IP-Country-2.18/lib/IP/Country.pm
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On Friday 19 November 2004 7:18 pm, Chris Devers wrote:
On Fri, 19 Nov 2004 [EMAIL PROTECTED] wrote:
I wanted to get the IP address and the OS of the system when some
one checks in the page...How will I get the IP address and OS of
the person who visits the page(with PERL CGI)
As I
Hi
I wanted to get the IP address and the OS of the system when some one
checks in the page...How will I get the IP address and OS of the person
who visits the page(with PERL CGI)
Thanks
Anish
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
On Fri, 19 Nov 2004 23:47:01 +0530 (IST), [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi
I wanted to get the IP address and the OS of the system when some one
checks in the page...How will I get the IP address and OS of the person
who visits the page(with PERL CGI)
Clients can lie to your
On Fri, 19 Nov 2004 [EMAIL PROTECTED] wrote:
I wanted to get the IP address and the OS of the system when some one
checks in the page...How will I get the IP address and OS of the
person who visits the page(with PERL CGI)
As I was saying the last time you asked a version of this question
[EMAIL PROTECTED] wrote:
Hi
I wanted to get the IP address and the OS of the system when some one
checks in the page...How will I get the IP address and OS of the
person who visits the page(with PERL CGI)
Short answer:
$ENV{REMOTE_ADDR} contains the client IP address
$ENV
On Fri, 19 Nov 2004, Bob Showalter wrote:
1. The client IP address, which you can get by calling getpeername()
on STDIN (or from REMOTE_ADDR environment variable). If the client is
behind a proxy, you'd need to depend on the proxy adding something to
the request headers.
Moreover, nearly
PS This isn't shorter, but it is easier to understand :-)
PS /^(\d+)(??{ $1 0 $1 256 ? : (?!) }) \.
PS(\d+)(??{ $2 0 $2 256 ? : (?!) }) \.
PS(\d+)(??{ $3 0 $3 256 ? : (?!) }) \.
PS(\d+)(??{ $4 0 $4 256 ? : (?!) })
PS $/x
PS
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Ing. Branislav Gerzo) writes:
PS This isn't shorter, but it is easier to understand :-)
PS /^(\d+)(??{ $1 0 $1 256 ? : (?!) }) \.
PS(\d+)(??{ $2 0 $2 256 ? : (?!) }) \.
PS(\d+)(??{ $3 0 $3 256 ? : (?!)
while (TXT) {
/^((2[0-5]{2}|1\d{2}|[1-9]\d|[1-9])\.((2[0-5]{2}|1\d{2}|[1-9]\d|\d)\.){2}(2[0-5]{2}|1\d{2}|[1-9]\d|\d))(\s*(port|:|\s|\/td\s*td[^]+)\s*)([2-9]\d|[1-9]\d{2,3}|[1-5]\d{4}|6[0-4]\d{3}|654\d{2}|655[0-2]\d|6553[0-5])$/g;
ip = $1;
port = $8;
push(@ip,$ip,$port); #for
Ing. Branislav Gerzo wrote:
hm, quite huge regexp, hm ?
I think I would have done it in more than one step. Leaving the ports
aside, you could for instance start with extracting possible IP
addresses with something like:
/(\d{1,3}(?:\.\d{1,3}){3})/
Then you could have a function test the
Chasecreek Systemhouse [CS], on Friday, November 12, 2004 at 03:18
(-0500) typed:
CS For theose less inclined to work with such a R/E -
CS This module accepts valid IP Addresses:
CS http://search.cpan.org/~frajulac/Net-IPv4Addr-0.10/IPv4Addr.pm
Ok, but I also wrote about IP:PORT, and at the
Gunnar Hjalmarsson [GH], on Friday, November 12, 2004 at 09:23 (+0100)
typed the following:
GH I think I would have done it in more than one step. Leaving the ports
GH aside, you could for instance start with extracting possible IP
GH addresses with something like:
GH
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Ing. Branislav Gerzo) writes:
anyone knows how looks _good_ ip adress regexp ?
I use something like:
(\d{1,3}\.){3}\d{1,3}
but that also matches for example 888.777.444.222, which is of course
not good ip adress. I don't want use any module for
On Fri, Nov 12, 2004 at 03:18:50PM -, Peter Scott wrote:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Ing. Branislav Gerzo) writes:
anyone knows how looks _good_ ip adress regexp ?
I use something like:
(\d{1,3}\.){3}\d{1,3}
but that also matches for example 888.777.444.222,
Hi all,
anyone knows how looks _good_ ip adress regexp ?
I use something like:
(\d{1,3}\.){3}\d{1,3}
but that also matches for example 888.777.444.222, which is of course
not good ip adress. I don't want use any module for this, I only want
fing proper regular expression for IPs. I thought
;
# random and invalid
my $bad_ip = 259.1000.345.701;
for my $curr_ip (($ip, $bad_ip)) {
if (ip_is_ipv4($curr_ip)) {
print IP $curr_ip is GOOD\n;
} else {
print $curr_ip is not a valid IP address\n;
}
}
# output:
# IP 209.168.201.93 is GOOD
On Thu, 2004-11-11 at 15:44, Christopher Maujean wrote:
On Thu, 2004-11-11 at 15:29, Ing. Branislav Gerzo wrote:
Hi all,
anyone knows how looks _good_ ip adress regexp ?
I would skip re-inventing the wheel and use the Net::IP module.
Example:
didn't notice your requirement about not
Ing. Branislav Gerzo wrote:
anyone knows how looks _good_ ip adress regexp ?
I use something like:
(\d{1,3}\.){3}\d{1,3}
but that also matches for example 888.777.444.222, which is of course
not good ip adress.
What's your definition of a good IP address? Do you care about correct
DNS, do you
(\d{1,3}\.){3}\d{1,3}
sub goodIP { gethostbyaddr pack('C4', split /\./, shift), 2 }
print Good IP address\n if goodIP('11.22.33.44');
You'd better define good.
I agree -- let's define it as a CIDR block:
http://search.cpan.org/search?query=CIDRmode=all
=)
--
WC -Sx- Jones
Gunnar Hjalmarsson [GH], on Friday, November 12, 2004 at 00:59 (+0100)
contributed this to our collective wisdom:
GH What's your definition of a good IP address? Do you care about correct
GH DNS, do you care about whether the address is in use?
I care about that, if its syntax is correct:
1
:59 (+0100)
contributed this to our collective wisdom:
GH What's your definition of a good IP address? Do you care about correct
GH DNS, do you care about whether the address is in use?
I care about that, if its syntax is correct:
1-255.0-255.0-255.0-255
GH To me, this test comes to mind
How do I get the browser's IP address in a server side cgi perl script? The
web server stores this information in an environment variable but I don't
see a function to retrieve it in the 5.6.1 perldoc for cgi.
Thanks,
Siegfried
On Tue, 24 Aug 2004, Siegfried Heintze wrote:
How do I get the browser's IP address in a server side cgi perl script?
It's in $ENV{'REMOTE_ADDR'}.
Poke at your %ENV hash for other possibly useful values.
--
Chris Devers [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'Charles
Lrmk wrote:
I want one of my scripts to process IP addreses and detect the country and
other information like city, ISP, and the IP range which has the same
attributes
I tryied writing a script to post the IP address to regional network
information center's web site's who is form
I want one of my scripts to process IP addreses and detect the country and
other information like city, ISP, and the IP range which has the same
attributes
I tryied writing a script to post the IP address to regional network
information center's web site's who is form and then process
Hello.
I need to be able to rename a NT4 workstations computername and IP address remotely
with Perl.
Has any one a good starting point? Example scripts? Links?
Thankx
Ned Cunningham
POS Systems Development
Monro Muffler Brake
200 Holleder Parkway
Rochester, NY 14615
(585) 647-6400 ext. 310
[EMAIL PROTECTED] writes:
Hi,
I'm trying to find my IP address from within Perl for eth0 and ppp0.
Currently I run a regex on the output of ifconfig to extract his data -
but, I'd like to do this from within Perl and it strikes me that this
should be possible.
HELP! ANYBODY!
Well
Harry Putnam wrote:
[EMAIL PROTECTED] writes:
Hi,
I'm trying to find my IP address from within Perl for eth0 and ppp0.
Currently I run a regex on the output of ifconfig to extract his data -
but, I'd like to do this from within Perl and it strikes me that this
should be possible.
HELP! ANYBODY
on will probably have some other systemly way
to find this information.
-Chris
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 6:41 AM
To: [EMAIL PROTECTED]
Subject: finding out my IP address..
Hi,
I'm trying to find my IP
Hi,
I'm trying to find my IP address from within Perl for eth0 and ppp0.
Currently I run a regex on the output of ifconfig to extract his data -
but, I'd like to do this from within Perl and it strikes me that this
should be possible.
HELP! ANYBODY!
Kev
--
To unsubscribe, e-mail: [EMAIL
Hi,
I'm trying to find my IP address from within Perl for eth0 and ppp0.
Currently I run a regex on the output of ifconfig to extract his data -
but, I'd like to do this from within Perl and it strikes me that this
should be possible.
HELP! ANYBODY!
Well this module seems to do
Hi,
I'm trying to find my IP address from within Perl for eth0 and ppp0.
Currently I run a regex on the output of ifconfig to extract his data -
but, I'd like to do this from within Perl and it strikes me that this
should be possible.
HELP! ANYBODY!
Well this module seems to do what
Kevin Bewley
I'm trying to find my IP address from within Perl for eth0 and ppp0.
Currently I run a regex on the output of ifconfig to extract his data -
but, I'd like to do this from within Perl and it strikes me that this
should be possible.
Hi Kevin.
This is from
perldoc -q IP
1 - 100 of 212 matches
Mail list logo