On 2014-03-04 00:35, shawn wilson wrote:
So, when I do this:
my $src = (grep {/.*(ARIN|APNIC).*(\n)?/; $1} @ret)[0];
I get a full line and not just the capture:
# ARIN WHOIS data and services are subject to the Terms of Use
First understand what you coded:
grep() is a filter: it only passes
On 03/03/2014 23:35, shawn wilson wrote:
So, when I do this:
my $src = (grep {/.*(ARIN|APNIC).*(\n)?/; $1} @ret)[0];
I get a full line and not just the capture:
# ARIN WHOIS data and services are subject to the Terms of Use
When I do this:
my $src = (grep {s/.*(ARIN|APNIC).*(\n)?/$1/} @ret
On Mar 4, 2014 9:46 AM, "Shawn H Corey" wrote:
>
> On Tue, 4 Mar 2014 09:24:53 -0500
> shawn wilson wrote:
>
> > my $src = (map {s/.*(ARIN|APNIC).*(?:\n)?/$1/r} @ret)[0];
>
> You do realize this is process the whole array and then throwing out
> all but the first? And it has the side effect of mo
Please do http://learn.perl.org/installing/windows.html then
http://www.cpan.org/modules/INSTALL.html.
On 4 March 2014 17:42:01 GMT+07:00, Yosef Levy wrote:
>Hello All,
>
>I am interesting install Perl and CPAN modules in custom location
>folders.
>I am using WIN7 64bit.
>Pls. provide me step b
On Tue, 4 Mar 2014 09:24:53 -0500
shawn wilson wrote:
> my $src = (map {s/.*(ARIN|APNIC).*(?:\n)?/$1/r} @ret)[0];
You do realize this is process the whole array and then throwing out
all but the first? And it has the side effect of modifying the array?
--
Don't stop where the ink does.
It needs to be grep as a map would return the first line no matter
what - not what I want. Also, this doesn't work:
sub whois
{
my ($whois) = @_;
my $sock = IO::Socket::INET->new(
PeerAddr=>$whois,
PeerPort=>'43',
Timeout=>'60',
);
return undef unless (defined($sock));
$soc
let me suggest you start here:
http://bit.ly/1lwoehv
and
http://www.catb.org/~esr/faqs/smart-questions.html
and then report back with specific questions or problems you are having.
Matt
===
*Clarke's Three Laws*
1. When a distinguished but elderly scientist states th
Hi Yosef,
As a Windows user , you will first need to decide what distribution to use.
Two options are Strawberry Perl (http://strawberryperl.com/) or ActiveState
Perl (http://www.activestate.com/activeperl/downloads). Both are available
for your architecture. Download the necessary installation fi
Hello All,
I am interesting install Perl and CPAN modules in custom location folders.
I am using WIN7 64bit.
Pls. provide me step by step in depended installation from scratch.
Rgds.