if (@paths) is simpler.
Improve your skills with Modern Perl: the free book.
In reply to Re^2: return $paths only if ... by chromatic in thread return $paths only if ... by cesapun