in reply to Simplify This

@iparray = $record =~ /^\s*(\d+)[ .]+(\d+)[ .]+(\d+)[ .](\d+)/;
alternately,
@iparray = map {s/ //g;$_} split /[.]/, substr ($record,0,17);

$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

Replies are listed 'Best First'.
Re: Re: Simplify This
by ChrisR (Hermit) on Sep 30, 2003 at 19:01 UTC
    Both examples return a value of 4. I was looking for "100.100.100.100".

    OOPS: Sorry about that. It does return what I was looking for. THANKS