On Mon, 3 Mar 2014 18:35:55 -0500
shawn wilson <ag4ve...@gmail.com> 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

If you can't figure out what's wrong, neither will the poor chap who
gets stuck maintaining it. Use a loop instead:

my $captured;
for $ret ( @ret ){
    if( $ret =~ /(ARIN|APNIC)/ ){
        $captured = $1;
        last;
    }
}

-- 
Don't stop where the ink does.
        Shawn

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to