in reply to Re: pull single value
in thread pull single value

Can u help me with this? What if i want to save whatever is matched.
my $record = "662-5555"; my $record = "+1 102 892-1314"; while($record =~ m/(^\d{3}-\d{4}$)/) { print "$record"; }
Thanks, Pamela

Replies are listed 'Best First'.
Re^3: pull single value
by ikegami (Patriarch) on Nov 09, 2009 at 21:53 UTC

    Then go back to using push @array, $record;, like you did in the OP.

    Maybe you should address the warning before you do anything else.

Re^3: pull single value
by ikegami (Patriarch) on Nov 09, 2009 at 21:56 UTC

    Then go back to using push @array, $record;, like you did in the OP.

    Maybe you should address the warning before you do anything else.