#/usr/bin/perl opendir DIR, "$ARGV[0]/users" or die $!; @dirs = grep { -d "$ARGV[0]/users/$_" and not /^\./ }readdir DIR; print "$_\n" for @dirs; #/usr/bin/perl @fullpath = grep { -d and not /^\./ } glob "$ARGV[0]/users/*"; @dirs = map { s!\Q$ARVG[0]\E/users/!!; $_ } @fullpath print "$_\n" for @dirs;