in reply to Removing a Pattern matched in a Scalar
Anyway, play with it, and try something like this:#!/usr/bin/perl # use strict; my $scalar = "::fruits||apple::fruits||orange::vegetable||celery::vege +table||lettuce"; $scalar =~ s/::vegetable\|\|celery//; print $scalar;
#!/usr/bin/perl # use strict; use Data::Dumper; my @arr = ( {fruits => "apple"}, {fruits => "orange"}, {vegetable => "celery"}, ); print Dumper(@arr);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Removing a Pattern matched in a Scalar
by anonymized user 468275 (Curate) on Jul 25, 2005 at 09:26 UTC |