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
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.
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
erl based company has 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 downl
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
wrote:
> On 05/03/2012 12:25 P
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://205.178.x.
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
wrote:
> For a project at work, I need t
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 hav
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
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/
-
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-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
use Regexp::Common qw/ net /;
$ip =~ /$RE{net}{IPv4}/;
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
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
.
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
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
/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
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
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 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
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 f
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
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
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
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
> >
> >
>
($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/
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
>
($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 &
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
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
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
> -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
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
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
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
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
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
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
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
> discuss
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_R
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
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
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_
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.
--
T
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:
http://perldoc.perl.org/perlop.html#
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/
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
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
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
$data_file="/home/uid/
mailto:[EMAIL PROTECTED]
Sent: Thursday, June 15, 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
> > mail
> 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
> > stuf
-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
&
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 hard
> 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 aquir
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
;
>
> while ($x = )
> {
> chop $x;
> @arr = split /\s+/,$x;
> print "@arr\n";
> }
>
> # Converting IP number to IP address.
> foreach $ipaddr {
> $ip1 = int ($ipaddr / (256**3));
> $ipaddr %= ($ip1 * 256**3);
> $ip2 = int ($ipaddr / (256**2));
> $ipaddr %= ($ip2 *
<[EMAIL PROTECTED]> asked:
> I need to convert the first column of a list of IP numbers to
> IP addresses. I created an array of my list but am stumped
> on how to convert the numbers.
#!/usr/bin/perl
use strict;
use warnings;
use Socket;
sub number_to_ip {
return( inet_ntoa( pack( 'N', $
imstrmcs09
180884581 imstrmcs10
Script:
# Properly formatting into an array
open(IPLIST, "file") || die "couldn't open the file";
while ($x = )
{
chop $x;
@arr = split /\s+/,$x;
print "@arr\n";
}
# Converting IP number to IP address.
foreach $ipa
180884581 imstrmcs10
Script:
# Properly formatting into an array
open(IPLIST, "file") || die "couldn't open the file";
while ($x = )
{
chop $x;
@arr = split /\s+/,$x;
print "@arr\n";
}
# Converting IP number to IP address.
foreach $ipaddr {
$ip1
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 for
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
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 ethernet adapters and the
Hi
Thanks...But it is mentioned.. This module will work for ip V4
Is there any module which is compatble is Ip V 6 also...
Anish
- Original Message -
From: "John W. Krahn" <[EMAIL PROTECTED]>
To: "Perl Beginners"
Sent: Friday, December 24, 2004 12:49 PM
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 additio
Hi
Is there any module in perl where I can Map the IP country with the country..
Thanks
Anish
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(
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 h
[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
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
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
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
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+)(??{
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 ? "
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.7
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 modu
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> /(\d{1,3}(?:\.\d{1,
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
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 val
> > while () {
> >
> > /^((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*]+>)\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); #f
r 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
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
> > (\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
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 corre
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
209.168.201.93";
# 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&quo
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 about
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
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 p
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
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.
HEL
[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
. Whatever system you're 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..
On Wed, 29 Oct 2003 [EMAIL PROTECTED] wrote:
>
>
>
> >> 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
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.
T
>> 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 possib
> 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! ANYB
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-ma
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!
Kev
--
To unsubscribe, e-mail: [EMAIL
1 - 100 of 200 matches
Mail list logo