1#!/usr/local/bin/perl 2 3# mkdir-p.pl 4 5# On some systems, the -p option to mkdir (= also create any missing parent 6# directories) is not available. 7 8my $arg; 9 10foreach $arg (@ARGV) { |
11 $arg =~ tr|\\|/|; |
12 &do_mkdir_p($arg); 13} 14 15 16sub do_mkdir_p { 17 local($dir) = @_; 18 19 $dir =~ s|/*\Z(?!\n)||s; --- 15 unchanged lines hidden --- |