mirror of
https://github.com/imapsync/imapsync.git
synced 2024-11-17 08:12:48 +01:00
28 lines
677 B
Plaintext
28 lines
677 B
Plaintext
|
#!/usr/bin/perl -w
|
||
|
|
||
|
my $f_sep="/";
|
||
|
my $t_sep=".";
|
||
|
my $o_sep="\000";
|
||
|
|
||
|
foreach my $f_fold ("testsub/testsub3", "testsub.testsub3", "a.b/c.d/e" ) {
|
||
|
my $t_fold;
|
||
|
print "From Folder [$f_fold]\n";
|
||
|
$t_fold = $f_fold;
|
||
|
my $t_fold2 = $t_fold3 = $f_fold;
|
||
|
|
||
|
$t_fold =~ s@\Q$f_sep@$t_sep@g;
|
||
|
$t_fold2 =~ s@\Q$t_sep@$f_sep@g;
|
||
|
$t_fold3 =~ s@\Q$t_sep@$o_sep@g;
|
||
|
$t_fold4 = $t_fold3;
|
||
|
$t_fold4 =~ s@\Q$f_sep@$t_sep@g;
|
||
|
$t_fold5 = $t_fold4;
|
||
|
$t_fold5 =~ s@\Q$o_sep@$f_sep@g;
|
||
|
|
||
|
#$t_fold =~ s@/@.@g;
|
||
|
print "To /. Folder [$t_fold]\n";
|
||
|
print "To ./ Folder2[$t_fold2]\n";
|
||
|
print "To .0 Folder3[$t_fold3]\n";
|
||
|
print "To .0 Folder4[$t_fold4]\n";
|
||
|
print "To 0/ Folder5[$t_fold5]\n\n";
|
||
|
}
|