# - some clean-up... #
#####################################################################
-die "You have to specify input files" if (@ARGV < 1);
-
$pear = "/usr/share/pear";
@files = ();
%req = ();
-while (@ARGV > 0) {
- $f = shift;
+foreach (@ARGV ? $ARGV : <> ) {
+ chomp;
+ $f = $_;
push @files, $f;
# skip non-php files
next unless ($f =~ /\.php$/);
}
next if ($x =~ m|^\./| or $x =~ /\$/);
+ next unless ($x =~ /\.php$/);
$req{$x} = 1;
}
}
next if ($x =~ /\$/);
+ next unless ($x =~ /\.php$/);
$x = "$file_dir/$x";
$x =~ s|/+|/|g;