- or download this
sub GetFile2
...
sub isAbsPath
- or download this
sub isAbsPath
{
@_ or return 0;
...
return 1 if ($c == 47 || $c == 92);
return 0;
}
- or download this
sub isAbsPath {
my $path = shift;
return 0 unless defined $path;
return $path =~ /^([A-Z]:|[\/\\])/ ? 1 : 0;
}