Is it possible to do an inlined "substitution"? For example, given the following:
I need to do this...but, INLINED:
So, I'm trying to do something like this:
Which, obviously, doesn't work!
I can come up with a way of doing this with "substr", but it gets messy...so, I was hoping there was another, simpler way of doing it.
Thanks in advance!!
Code:
$this = $that1 . $that2;
Code:
$that1 =~ s/X//i;
$that2 =~ s/Y//i;
$this = $that1 . $that2;
Code:
$this = ($that1 =~ s/X//i) . ($that2 =~ s/Y//i);
I can come up with a way of doing this with "substr", but it gets messy...so, I was hoping there was another, simpler way of doing it.
Thanks in advance!!