clean
This commit is contained in:
parent
7a68277bca
commit
6533d835fa
1 changed files with 3 additions and 7 deletions
|
|
@ -16,7 +16,6 @@ use strict;
|
|||
use Digest::MD5;
|
||||
use Getopt::Std;
|
||||
|
||||
my ( $opt_e, $opt_h, $opt_s );
|
||||
my %opts = ();
|
||||
getopts('ehms', \%opts);
|
||||
|
||||
|
|
@ -30,7 +29,6 @@ if ( $opts{m} ) {
|
|||
&quick_comp(%sizes);
|
||||
}
|
||||
|
||||
|
||||
#################################
|
||||
# functions
|
||||
|
||||
|
|
@ -74,8 +72,8 @@ sub quick_comp(%) {
|
|||
|
||||
# same md5 calculation i use in mv_wrap
|
||||
sub calc_md5($) {
|
||||
my ($file, $digest, $md5, $FILE);
|
||||
$file = shift;
|
||||
my $file = shift;
|
||||
my ( $digest, $md5, $FILE );
|
||||
$md5 = Digest::MD5->new;
|
||||
open $FILE, "<$file" or die "couldn't open file: $!\n";
|
||||
seek($FILE, 0, 0);
|
||||
|
|
@ -173,10 +171,8 @@ sub output($) {
|
|||
my $string = shift;
|
||||
if ($opts{e}) {
|
||||
$string =~ s/([ \&\;\`\'\\\"\|\*\?\~\<\>\^\(\)\[\]\{\}\$\010\013\020\011])/\\${1}/g;
|
||||
print "$string";
|
||||
} else {
|
||||
print "$string";
|
||||
}
|
||||
print "$string";
|
||||
}
|
||||
|
||||
sub help {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue