No, that don't work. Your first line will substitue any A-Z character in $A with a pipe, which means all characters in this case since $A doesn't contain anything else. Then you split on pipes, which gets you a @values full of empty strings. Then you map in void context..
If you leave out the substitution and split on nothing, it “works”:
Except all it does is split $A into characters and print them on a line each. I have no idea how that is supposed to solve the poster's problem though, since it doesn't even look at $B. The if is superfluous as well, since every element of @values is guaranteed to contain one character from $A.my @values = split //, $A; map { if ($_ ne "" ) {print "[$_]\n";} } @values;
Makeshifts last the longest.
In reply to Re^2: Complicated pattern match
by Aristotle
in thread Complicated pattern match
by dr_jgbn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |