From cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 17 Dec 2004 16:04:58 +0000 Subject: perl_checker fixes --- packdrake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packdrake') diff --git a/packdrake b/packdrake index 2a9e670..22a5469 100755 --- a/packdrake +++ b/packdrake @@ -37,11 +37,11 @@ usage: sub main { my ($file, $mode, $dir, $size, $method, $compress, $uncompress, $ratio, $quiet); my @nextargv = (\$file); - my @list = (); + my @list; #- some quite useful error message. my $error_mode = "packdrake: choose only --build, --extract, --list or --cat\n"; - for (@_) { + foreach (@_) { /^--help$/ and do { usage; next }; /^--build$/ and do { $mode and die $error_mode; $mode = "build"; @nextargv = (\$file); next }; /^--extract$/ and do { $mode and die $error_mode; $mode = "extract"; @nextargv = (\$file, \$dir); next }; @@ -66,7 +66,8 @@ sub main { $mode =~ /extract|list|cat/ or @nextargv or die qq(packdrake: unknown option "$_", check usage with --help\n); - my $ref = shift @nextargv; $ref ? $$ref = $_ : push @list, $_; + my $ref = shift @nextargv; + $ref ? ($$ref = $_) : push @list, $_; $mode ||= "list"; } -- cgit v1.2.1