Here is one of the way to remove the strings matched in the line from the array.
use strict; use warnings; use Data::Dumper; my $line ='Lorem ipsum dolor sit amet, consectetur adipisicing elit'; my @array1 = ('ipsum', 'sit amet', 'elit'); foreach(@array1) { $line =~ s/$_//g; } print $line;
In reply to Re: Parsing a sentence based on array list
by vinoth.ree
in thread Parsing a sentence based on array list
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |