Hey, I have a slight dilemma which i'm struggling to overcome. Wondering if
anyone has any ideas on this..

I have a variable, for example's sake, say $variable. $variable has a load
of entries.

$variable = "danneh blah dan etc danster";

What i want to do, without having to set the entire string to an array, loop
through it, compare etc, is to remove the single entry "dan", and leave the
other 2 entries with "dan" contained in them in tact. I used to use

$remove = "dan";
$variable =~ s/\Q$remove//g;

with & without the g at the end. But the problem with that was it would
remove the dan from danneh and danster too, leaving

$variable = "neh blah  etc ster";

any clue how this may be possible?

Thanks in advance.

Dan



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to