As programmers we can only comment on how or how best a requirement may be achieved with Perl, not on whether that requirement itself is better or worse -- that's for the designers and analysts to figure out! As Corion implies, the "next" changes the functionality and hence changes the requirement the program meets or doesn't. If this is a real requirement it might be an idea to state it.