If I have read a file as an array (probably not a good way for memory in case of big files). How can I move to the next line after matching a word in the if statement in this case?
Code:
@data=<DATA>;
foreach $elem (@data) {
if ($elem= ~ m/^RBODY /)
{
exp; #storing info from $elem
#how can i store info from the next line ?
}
}