1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 08:12:48 +01:00
imapsync/W/learn/separator

28 lines
768 B
Plaintext
Raw Normal View History

2011-03-12 03:43:50 +01:00
#!/usr/bin/perl -w
2011-03-12 03:44:06 +01:00
my $f_sep = $ARGV[0] || "/";
my $t_sep = $ARGV[1] || ".";
my $o_sep = "\000";
2011-03-12 03:43:50 +01:00
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;
2011-03-12 03:44:06 +01:00
$t_fold =~ s<>\Q$f_sep<65>$t_sep<65>g;
$t_fold2 =~ s<>\Q$t_sep<65>$f_sep<65>g;
$t_fold3 =~ s<>\Q$t_sep<65>$o_sep<65>g;
2011-03-12 03:43:50 +01:00
$t_fold4 = $t_fold3;
2011-03-12 03:44:06 +01:00
$t_fold4 =~ s<>\Q$f_sep<65>$t_sep<65>g;
2011-03-12 03:43:50 +01:00
$t_fold5 = $t_fold4;
2011-03-12 03:44:06 +01:00
$t_fold5 =~ s<>\Q$o_sep<65>$f_sep<65>g;
2011-03-12 03:43:50 +01:00
2011-03-12 03:44:06 +01:00
#$t_fold =~ s<>/<2F>.<2E>g;
print "To $f_sep$t_sep /. Folder [$t_fold]\n";
print "To $t_sep$f_sep ./ Folder2[$t_fold2]\n";
print "To $t_sep"."0 .0 Folder3[$t_fold3]\n";
print "To $f_sep$t_sep of .0 Folder4[$t_fold4]\n";
print "To 0$f_sep 0/ Folder5[$t_fold5]\n\n";
2011-03-12 03:43:50 +01:00
}