http://www.perlmonks.org?node_id=479438


in reply to Yet another array problem

Well... The first line inside the loop is redundant, as you assign a string to an array, then overwrite that same array.

Your code below is laso relying on $_ in cases where there is no value.

Consider this:

while (<>) { for (/(\d+)/g) { print $_, "\n"; } }



pbeckingham - typist, perishable vertebrate.