perlquestion
LoneRanger
This code snippet is part of a playlist generator. I'd like to be able to take in arguments such as dir. to start searching at, and what to search for. The File::Find mod. seems to have some probs with the regexp being a variable...Any solutions?
<CODE>
my $MP3dir = $ARGV[0];
my $searchfor = $ARGV[1];
#$MP3dir = "\"" . $MP3dir . "\"";
my $regexp = "\/\\.$searchfor\/";
find(\&wanted, $MP3dir);
sub wanted
{
$regexp or return;
</CODE>