opendir(DIR, $isbn) or print "Can't open $isbn: $! No such job found!"; my @contents = grep /(.+?)/, readdir DIR; foreach $file ( @contents ) {print "$file\n";}