To do the substitution, you can do that:
s/[^\.]+$/0/;
I'm not sure if that what you are looking for or not.
Jorge Goncalvez wrote:
> Hi, I have this:
> open (IPCONF,"< $_Globals{IPCONFIG}") or die "je ne peux ouvrir
> $_Globals{IPCONFIG} :$!";
> @ten=<IPCONF>; close IPCONF;
> foreach(@ten){
> chomp();
>
> if ($_ =~ /Adresse IP/) {
>
> $_ =~ s/.+://;
> push @Ip,$_;
> }
>
>
> }
>
> What I wanted is to get rid of this for exemple $_=192.40.54.41 I would like
> to put $_=192.40.54.00.
>
> In fact to get rid of the last 2 numbers and put 0.0 instead .
>
> Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]