my $currentstoryid = $entry; my $exists=0; &find( sub { if (/$currentstoryid/) { $exists = 1; return $exists; } }, $sitedir);