#!/usr/bin/perl use warnings; use strict; my $file = 'C:/Windows/System32/drivers/etc/hosts'; my %replace = ( '#' => q(), '' => '#' ); open my $In, '<', $file or die $!; open my $Out, '>', "$file.new" or die $!; while (<$In>) { s/(#?)(10\.10\.1\.2)/$replace{$1}$2/; print {$Out} $_; } close $Out or die $!; rename "$file.new", $file or die $!; #### ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,