simple creation of directories

[email protected] (allan) Tue, 09 Oct 2001 00:46:27 +0200
Newsgroups perl.macperl.anyperl
Message-ID <[email protected]>
hi
are there a simple way to produce a directory tree, based on path
information like in the example below:
thanks allan

# two path as they might appear in a file
my $path = ":root:level_1:level_2";
my $otherpath = ":root:level_1b";

# create tree if it doesnt alreay exist
unless (-e $path) {
	mkdir($path, 0666) or die $!;
}

# should output a structure like this:
root
	level_1
		level_2
	level1_b