$subdir =~ m{^/};
returns a true value if $subdir starts with a '/'.
So the whole statement leaves $subdir as it is, if it already is an absolute path (starting with /) or it prepends a $BASEDIR and stores the result in $subdir again.
Cheers, Flo
In reply to Re: what does $subdir = "$BASEDIR/$subdir" unless $subdir =~ m{^/}; do
by rafl
in thread what does $subdir = "$BASEDIR/$subdir" unless $subdir =~ m{^/}; do
by richill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |