Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: accumulating rex-exp matches in an array

by Sifmole (Chaplain)
on Jun 25, 2002 at 18:17 UTC ( #177159=note: print w/replies, xml ) Need Help??


in reply to accumulating rex-exp matches in an array

while (<INFILE>) { while (s/(AAA\.\d)/xxxxx/) { push (@list, $1); } }
or if the items are always seperated by a space.
while (<DATA>) { push (@foo, grep /AAA\.\d/, split(/\s*,\s*/)); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://177159]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2021-01-27 20:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?