There is a great CPAN module for this sort of thing: File::Spec.
Specifically, it sounds like you want abs2rel:
use File::Spec; my $rel_path = File::Spec->abs2rel($CurrentPath, $BasePath);
Or were you trying to avoid using it for some reason or other?
In reply to Re: Help with Regular Expressions
by Riales
in thread Help with Regular Expressions
by FFSparky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |