Pop up the mesh clothes hamper by pulling up on the top rim so that the hamper extends to its fullest height possible. Remove any tags, plastic or other material from the outside and inside of the hamper. Check the new hamper for any holes or ripped seams that may allow wasps and other insects to get inside and harm the caterpillars. Carefully examine the top to ensure that it will open easily and close tightly.
Place the hamper in a sunny area either indoors or on a screened in porch away from any obvious bee's or wasp's nest, and place the hamper in a dry place. Keep the hamper away from any large objects that can knock into it or tip it over such as benches, chairs, tables and other furniture, and keep it out of the way of frequent foot traffic.
Unzip the top and fold it back over the hamper side. Crumple some waste paper, place it on the bottom of the hamper and change the waste paper every few days. You can pile the waste paper a few inches up the sides of the hamper to catch caterpillar waste and to make it easier to remove and add fresh waste paper.
Place three potted milkweed plants or any type of plants you know the caterpillars will eat into the center of the hamper and surround them with the waste paper on the bottom. Place one or two caterpillars and butterflies on each plant; the butterflies will lay eggs on the plants, and the caterpillars will eat the plants' leaves. Close the hamper top and securely zip it shut.
Unfold the netting and drop it over the hamper to prevent wasps and other small insects from harming the eggs and caterpillars. Examine the netting on a daily basis to ensure that no insects are getting through it and into the inside of the hamper. Count the number of butterflies and caterpillars inside the hamper every couple of days to see if any have died.