in reply to Re: use -d -t -s as script args
in thread SOLVED:use -d -t -s as script args

I figure it out
my $code = "sub is_wanted { " . join(" and ", @ARGV) . " } "; unless (eval $code.1) { die "Error in code: $@\n\t$code\n"; } $_ = $filepath; if (is_wanted()){ push @matched, $filepath; }

Replies are listed 'Best First'.
Re^3: use -d -t -s as script args
by Anonymous Monk on Jun 29, 2024 at 00:05 UTC
    um, do it safely, don't use @ARGV directly