in reply to Removing a Pattern matched in a Scalar

If i understood you question correctly, do you want something like this.

$name = 'celery'; $scalar = "::fruits||apple::fruits||orange::vegetable||celery::vegetab +le||lettuce"; $scalar =~ s/::(fruits|vegetable)\|\|$name//gsi; print "$scalar";

Thanks in advance

Prasad

Replies are listed 'Best First'.
Re: Removing a Pattern matched in a Scalar
by Anonymous Monk on Jul 25, 2005 at 06:12 UTC
    Hey,

    seems like most of your replies all worked wonderfully :)

    Thanks a lot, and jbrugger I will take your advice and read more about Data::Dumper and formating this list inside hashes.

    Herny