Replacement in a string with a function call.



Hi,

What I want to do is search a string, find an IP Address, and replace
that with the DNS name.

$details[$i] =~ s/(\d+)(\.\d+)(\.\d+)(\.\d+):/&resolveDNS($1$2$3$4)/;

The string is named $details[$i] and resolveDNS is the function. The
function itself works. The IP Addresses I want to match are followed
by a colon and I do not want to match any other IP Addresses.

It is not making the subsitutions. It simply substitutes
&resolveDNS(IPADDRESS) instead.

Is there a way to call the function to have it return the value that i
want replaced?

Thanks.

.



Relevant Pages

  • Re: [SLE] (SOLVED!!!)(Revisited) Works in Windoze, NOT in SuSE!?!?!?!?!?!?
    ... dns wasn't working after fresh system install with default modem ... When I changed the init string it began working. ... I'm almost afraid of my modem now. ... Ok, install bind. ...
    (SuSE)
  • Re: Invalid Use of Null
    ... My command button is now working as intended. ... Dim DNS As String, DI As Integer ... Dirk Goldgar, MS Access MVP ...
    (microsoft.public.access.formscoding)
  • Re: Invalid Use of Null
    ... Dim DNS As String, DI As Integer ... DNS = DLookup(_ ... Dirk Goldgar, MS Access MVP ...
    (microsoft.public.access.formscoding)
  • Re: Invalid Use of Null
    ... Private Sub CheckDomain_Click ... Dim DNS As String, DI As Integer ... DNS = DLookup(_ ...
    (microsoft.public.access.formscoding)
  • Re: Why Five Strings
    ... > DNS wrote: ... >>> That way the B string gets longer so it feels stiffer, ... Prev by Date: ...
    (alt.guitar.bass)