in reply to Re: How do i extract 3 variables from each line in a file, and print them to a new file
in thread How do i extract 3 variables from each line in a file, and print them to a new file
Capturing doesn't work like that. You are overwriting $1 for each match.
Try something like
if you want to capture all matches from a /g.my @nums = $_ =~ /(\d+)ms/g;
|
---|
In Section
Seekers of Perl Wisdom