my $delim = quotemeta '|'; $delim = "\Q|\E"; my @foo = qw[ a|b|c d|e|f g|g|g|g ]; foreach(@foo){ s/$delim/\n/g; } print $_,$/,'--',$/ for @foo; __END__ a b c -- d e f -- g g g g --
In reply to Re: removing the delimiter
by Anonymous Monk
in thread removing the delimiter
by jinnks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |