#!/usr/bin/perl -w use strict; # input from ikegami my $word = 'abracadabra'; my @list = qw( a b c d e ); my $pattern = join("|" , @list); print "pattern: $pattern\n\n"; print "before: $word\n"; $word =~ s/$pattern//g; print "after : $word\n";
In reply to Re: Removing chars from a word from an array
by superfrink
in thread Removing chars from a word from an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |