edit: Sorry people. I just saw that I posted this in the wrong section. Can a mod please move this.#!/usr/bin/perl use warnings; use strict; use Term::ReadKey; print "[-] Enter the filename: "; chomp($file = <STDIN>); open(LIST,$file); @file1 = <LIST>; close(LIST); if (-e "cleaned.txt") { print "[-] Can cleaned.txt be deleted? "; $answer = <stdin>; if ($answer =~ /yes/i) { unlink "cleaned.txt"; } else { &exit } } print "[-] Cleaning...\n"; foreach $data (@file1) { ($w1) = split(/:/,$data); open(OUTPUT,">>cleaned.txt"); print OUTPUT $w1."\n" unless ($data =~ /-/); close(OUTPUT); } &exit; sub exit() { ReadMode 2; print "\n[-] Press ENTER to exit..."; <STDIN>; exit; }
In reply to Increase speed script by marto9
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |