So if you were using MS Windows I'd advise you to use something like start $directory, where $directory is the path you wish to open. Now depending on your window manager the equivalent method could be many things, for example for xfce xdg-open $directory, gnome-open $directory, kde-open $directory and so on. So you're going to have to figure out the details of the end user platform (unless this is for a specific target that you know about), and cater for each accordingly.
Update: you may want to play around with the following basic example:
#!/usr/bin/perl
use strict;
use warnings;
my $wm = $ENV{'XDG_CURRENT_DESKTOP'};
print "Window Manager: $wm";
# later on, call specific system command for the running window manage
+r