# /a/b/../c -> /a/c

while (<>) {

	    $line = $_;
        print "$line";
	    while ($line =~ /\.\./) {
	        $line =~ s![^\./]*?/\.\./!!; # black magic
			print "\t$line";
	}
}
##

# 1 while s#/[^/]+/\.\./#/#;


#while ($path =~ s%[^/]+/\.\./%%) {}
#$path =~ s%/\./%/%g;
#$path =~ s%//+%/%g;
#$path =~ s%^\./%%;



