in reply to Re: file creation
in thread file creation
sub create_dirs { use File::Spec; my $file = shift; my $dir; foreach ( File::Spec->splitdir( (File::Spec->splitpath( $file ))[1 +] ) ) { $dir = File::Spec->catdir($dir, $_); next if -d $dir; mkdir( $dir ) || die $!; } }
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'
|
|---|