index,rindex,substr,length,split,tr
That ought to be more than enough to get you starteduse strict; use warnings; use Win32; die unless $^O =~ /Win32/i; my $copyme = 'C:/Apache/www-root/images'; my $here = 'C:/Apache/www-root/images/bgs'; $copyme = Win32::GetFullPathName($copyme); $here = Win32::GetFullPathName($here); # index STR, SUBSTR if( (index($copyme,$here) != -1) or (index($here,$copyme) != -1) ) { die "a horrible death"; } # Win32::GetShortPathName and Win32::GetLongPathName # may also be of interest (for use with open)
| ______crazyinsomniac_____________________________ Of all the things I've lost, I miss my mind the most. perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;" |
In reply to (crazyinsomniac) Re: Is this directory a subdirectory of another directory?
by crazyinsomniac
in thread Is this directory a subdirectory of another directory?
by mt2k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |