regex Perl help
I am relatively new to perl and trying to extract data off of large output files from a computer simulation model.
I want to search the output file for a certain keyword, then strip off the data from the next line, directly beneath it. For example:
U991 Am992 Am993 Np994 Pu995 U996 Cm997 Am998 12 34 .045 54 .92 453 2321 .433
I would like to search for "Pu995" then strip off the number directly beneath it. I know how to use regex's to find Pu995 uniquely, but not how to find the value for the number beneath it, which changes from computation to computation, but stays in the same "place". Meaning it always occurs there, with the same number of preceeding words or numerical values in front of it. I tried using $. to increase the line number by one, but didn't find that this allowed me access to gather data from the next line, and am not familiar enough to know if there is a quick and clean way to do it or a dirty way. Any help would be appreciated. Thanks!