in reply to Basic list manipulation, and a bit of map() confusion...
$ cat 669837.pl # 669837 use strict; use warnings; use Data::Dumper; my @a = qw (onexxx txwxo txhrexe xfourx xxx five); my @b = (); for (@a) { s/x//g; push @b, $_ if $_; } print Dumper(\@b); __END__ $ perl 669837.pl $VAR1 = [ 'one', 'two', 'three', 'four', 'five' ];
|
|---|