#!/usr/bin/perl -w

use strict;

use File::Path;

foreach (@INC){ 
    /\/usr(\/local)?\/lib\/.+?site_perl\/[^\/]+$/ && do { 
	if (defined $ARGV[0] && $ARGV[0] ne "/" && defined $ARGV[1]) {
	    print $ARGV[1];
	    mkpath ($ARGV[0].$_, 0, 0755);
	}
	else {
	    print;
	}
	exit(0);
    };
}

