betere foutmeldingen $! ipv $?
This commit is contained in:
parent
78745d481b
commit
ad85d0295d
1 changed files with 3 additions and 3 deletions
|
|
@ -68,7 +68,7 @@ sub edit {
|
||||||
@editor = (defined $ENV{EDITOR} ? $ENV{EDITOR} : "vi", "$filename");
|
@editor = (defined $ENV{EDITOR} ? $ENV{EDITOR} : "vi", "$filename");
|
||||||
if ($opt_e) { @editor = ($opt_e, "$filename") }
|
if ($opt_e) { @editor = ($opt_e, "$filename") }
|
||||||
system(@editor) == 0
|
system(@editor) == 0
|
||||||
or die "System @editor failed: $?";
|
or die "System @editor failed: $!";
|
||||||
}
|
}
|
||||||
|
|
||||||
# make tempfiles and install handler to remove them
|
# make tempfiles and install handler to remove them
|
||||||
|
|
@ -116,7 +116,7 @@ sub move_files {
|
||||||
|
|
||||||
# read pattern file
|
# read pattern file
|
||||||
sub read_pattern {
|
sub read_pattern {
|
||||||
open PAT, "< $opt_f" or die "Couldn't open pattern file: $?\n";
|
open PAT, "< $opt_f" or die "Couldn't open pattern file: $!\n";
|
||||||
@pattern = <PAT>;
|
@pattern = <PAT>;
|
||||||
close PAT;
|
close PAT;
|
||||||
}
|
}
|
||||||
|
|
@ -237,7 +237,7 @@ sub lock {
|
||||||
die "Another mv_wrap process is active in this direcory\n"
|
die "Another mv_wrap process is active in this direcory\n"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
open LOCK, "> .mv_wrap" or die "Couldn't open .mv_wrap for writing: $?\n";
|
open LOCK, "> .mv_wrap" or die "Couldn't open .mv_wrap for writing: $!\n";
|
||||||
print LOCK $$;
|
print LOCK $$;
|
||||||
close LOCK;
|
close LOCK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue