All pastes #927826 Raw Edit

Something

public text v1 · immutable
·published 2008-03-04 15:55 UTC
rendered paste body
#!/usr/bin/perl

use strict;

print "1. Mac -> PC\n";
print "2. PC -> Mac\n";
print "Choose wisely my son: ";
chomp(my $choice = <STDIN>);

if($choice == 1) {

        while (<STDIN>) {
                $_ =~ tr{/}{\\};
                $_ =~ s/smb://g;
                print "PC Version: $_";
        }
}

elsif ($choice == 2) {

        while (<STDIN>) {
                $_ =~ s/\\//;
                $_ =~ s/\\//;
                $_ =~ tr{\\}{/};
                $_ =~ s/[ \t]/\\ /g;
                $_ =~ s/%20/\\ /g;
                print "Mac Version: smb://$_";
        }
}

else {
        print "You did not select a valid option\n";
}