in reply to Re^3: How can I delete an element in a foreach cycle?in thread How can I delete an element in a foreach cycle?
foreach (...) { multiple lines of statements } [download]
@array = grep { multiple lines of statements } @array; [download]