Perl と PHP では quotemeta のクオート対象が異なるらしい
PHP では 「|」はクオートされないとのこと
Perl
% perldoc -f quotemeta | cat quotemeta EXPR quotemeta Returns the value of EXPR with all non-"word" characters backslashed. (That is, all characters not matching "/[A-Za-z_0-9]/" will be preceded by a backslash in the returned string, regardless of any locale settings.) This is the internal function implementing the "\Q" escape in double- quoted strings. If EXPR is omitted, uses $_.