I think you want to use 'map' instead of grep. HTH, Ken
On Mon, Mar 3, 2014 at 6:35 PM, 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 > > When I do this: > my $src = (grep {s/.*(ARIN|APNIC).*(\n)?/$1/} @ret)[0]; > I get just the match but it also alters the array > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >