in reply to Re: Absolute pathnames from relative?
in thread Absolute pathnames from relative?

This could be a good addition to File::Spec
sub File::Spec::un_upwards { my($self, $foo) = @_; $foo = $self->canonpath( $foo ); my $updir = $self->updir(); return $foo if -1 == index $foo, $updir; my( $volume, $directories, $file ) = $self->splitpath($foo); my @dar; foreach($self->splitdir( $directories )){ if( $_ eq $updir ){ if(@dar){# in case the path is relative, ie ../fo/bar/base pop @dar; } else { push @dar, $_; } } else { push @dar, $_; } } return $self->catpath( $volume, $self->catdir( @dar ), $file ); }

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.