(i.e., use the /g flag and assign the result to an array). If your problem is how to turn $filecontent into $line, then you want split. However—don't write your own regex; that's why we have Regexp::Common. (See Beast of the Number: Parsing the Feral Phone for why it's so scary to try to parse phone numbers.)my @matches = ( $line =~ m/$pattern/g )
P.S. What kind of phone number is 5 digits followed by 6 digits?
In reply to Re: Few Doubts
by JadeNB
in thread Few Doubts
by mecrazycoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |