in reply to Re: Did not get the regex matched value in perl array variable
in thread Did not get the regex matched value in perl array variable
You could use grep without incurring the cost of two implicit loops by removing the use of a temporary array:
my @queue = grep { /count=\s*(\d+)/; $1 } <DATA>;
|
|---|