Good afternoon;
I have a dumb question: I'm working with the following:

$line = "Joe Doe 123 Main St. Sometown, USA";

I have parsed the line to assign the values to the following variables:

$fname = "Joe";
$lname = "Doe";
$addr = "123 Main St.";

I'm trying to use the substitution operator to do something like:

        $line =~ s/$fname $lname $addr//;               ## doesn't like this syntax

So the value of $line now becomes "Sometown, USA".

I know I can do this by using 3 successive $line =~ s/..//; statements, but 
can it be done with one statement like I tried above??
I've tried placing [ ] around each variable, using the || operator between 
each variable- nothing seems to work.

Any and all help would be greatly appreciated.
Sincerely,
Carl

PS: I know: There are no dumb questions. Only questions asked by dumb people! :)

Reply via email to