if ( $fold =~m/.html$/) { open(FILE, $fold) || die "Cannot open File\n"; @lines=; close (FILE); foreach $lines(@lines) { $lines=~s/http/https/g; #------------upper extent of HELP Here------------- #convert html tags fromlower to upper #Whats wrong with match and extraction here ! if ($lines=~m/(<+)(\/?)(.+)(>+)/) {$tag=$3; $tag=~tr/a-z/A-Z/; } } #------------------------lower extent of help ----------- @log=@lines; open(FILE,">$fold") || die "cannot open file"; print FILE @lines; open(LOG,"+>>logfile.txt") || die "log file will not open!"; print LOG @log,"\n","#------newlog---------","\n"; close (LOG); close (FILE); } }