aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xetc/re!6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/re! b/etc/re!
index 1314ae9..1cd2198 100755
--- a/etc/re!
+++ b/etc/re!
@@ -18,7 +18,11 @@ for my $file (@ARGV) {
# parse shebang
my $shebang = <$o>;
- $shebang =~ /^#!/ or die "no shebang: $file\n";
+ if (not $shebang =~ /^#!/) {
+ warn "no shebang: $file\n";
+ close $o;
+ next;
+ }
$shebang =~ /^#!\s*(\S+)\s*(.*)/;
my ($old, $args) = ($1, $2);