in reply to Re: Stupid question about strings...
in thread Stupid question about strings...
C:\>perl -E "my $str1 = qq(|L|D|); my $str2 = qr(\|L\|);if ($str2 =~ $ +str1) { say 'foo';}" foo
Actually, SimonPratt is right. From OP's description ($str2 ["is in"] as a part of $str1) requires a regex test (if used) in the above order.
Update: Added direct quote from OP's spec to clarify my paraphase, "as a part of...."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Stupid question about strings...
by Laurent_R (Canon) on Jul 14, 2014 at 11:22 UTC | |
by ww (Archbishop) on Jul 14, 2014 at 16:54 UTC | |
by AnomalousMonk (Archbishop) on Jul 14, 2014 at 23:48 UTC | |
by Laurent_R (Canon) on Jul 15, 2014 at 08:26 UTC | |
by ww (Archbishop) on Jul 15, 2014 at 12:18 UTC | |
by Laurent_R (Canon) on Jul 15, 2014 at 17:42 UTC |