Perl regex with pipes
问题 I'm not exactly a perl monk, so if you could help me digest what does this regex(if it is one) do? my $pathHere = "/some/path/to/file"; my $pathThere = "/some/path/"; $pathHere =~ s|$pathThere||; Perl is not exactly my everyday tool, so I am quite shy on knowledge - I guess it subs the match to the var value, but guessing is not the way to go - the pipes throw me off... Thanks 回答1: In Perl you'd normally use the / as a delimiter in the regexp. $pathHere =~ s/abc/def/; # replace 'abc' with