http://qs321.pair.com?node_id=285899


in reply to Re: Re: Re: How to remove the $1 hard coding
in thread How to remove the $1 hard coding

Probably you meant this.
push @a, ('a b c'=~/(\w) /g)[1]; print "@a";
You need () to capture something into the array. You need the switch /g if you want to put every match into an array, not just the first match (hence for the index [$i] to work).