- or download this
# Prepend $pwd as necessary
@p=();
...
push @p, $_;
}
$path=join("/", @p);
- or download this
Benchmark: timing 1000 iterations of Mikfire, Zamboni...
Mikfire: 1 wallclock secs ( 0.47 usr + 0.00 sys = 0.47 CPU)
Zamboni: 4 wallclock secs ( 3.23 usr + 0.00 sys = 3.23 CPU)
- or download this
while ( $path =~ s#(/[^/]+)?/\.(\.)?/?#defined($2) ? "/" : "$1/"#e ) {
+;}