You don't have an $rs variable. You do have an $_rs variable which is likely what you want to use.
Careful not to use the die within the while loop condition. It will assign until it hits a false condition, in which case the die will trigger even during a proper iteration. So you'll want to make sure it is removed completely.
Last edited by Fou-Lu; 12-04-2012 at 07:13 PM..