in reply to I want to write a function, you call it ,it will return one matched record each time!

'it didn't work' isn't very descriptive and doesn't tell us anything useful.

But, as I have to guess, I'd say it's that the pattern in $last is too general, it will match not only the end of your block but also the end of struct m1.

  • Comment on Re: I want to write a function, you call it ,it will return one matched record each time!