By "push" do you mean that @digits already contains some data, and you want to append some extra stuff (digits) to it? If so...
push @digits, map { /[0-9]/ ? $_ : () } @list
But better than map would be grep.
push @digits, grep { /[0-9]/ } @list;
In reply to Re: using map
by tobyink
in thread using map
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |