You can use glob to get all files (a directory is just special kind of file), then use grep to filter out the plain files. To get directories underneath the currently running program...
#!/usr/bin/perl
use warnings;
use strict;
my @dirs = grep{-d $_}glob "*";
print join "\n",@dirs;