#!/usr/bin/perl -w my $f_sep = $ARGV[0] || "/"; my $t_sep = $ARGV[1] || "."; 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 $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"; }