there are some answers to this problem in other languages. I'm new to perl and I'm doing this (is more comparing strings than using filesystem-functions):

```
use File::Spec;

sub has_common_prefix {
  my ($path, $subpath) = @_;
  $path = uc (File::Spec->canonpath($path))."\\";
  $subpath = uc (File::Spec->canonpath($subpath));

  if ( substr($subpath, 0, length($path)) eq $path ) return 1;
  return 0;
};

has_common_prefix('c:\\/abCD/EFgh', 'C:\abcd\\efgh/ijk.txt');

```

I want to know if there are better ways to do this, well more "perlisch" :-)

Thanks.