Well, i wouldn't.
What are the temps like in your area? You need to be able to maintain a minimum of 75 year round, and a hot area of 95 or so. I imagine that hard to do using a mesh enclosure (keep in mind my snake room sits at about 55F in the winter. Otherwise, respiratory infections will set in.
Also, carpets, whilst semi-arboreal as young, need more ground space. Some young wont climb at all. It depends on the snake. At least 1 square foot of ground space per foot of snake.
I keep all of my carpets in malamine, glass fronted, front opening, 4x2x2 foot enclosures. Some will require larger (i.e. 5 or 6 x2x2) if they get towards 8 feet (which really only applies to the odd mcdowelli, or bredli, here and there).
You can make your own enclosures really cost efficiently, if you can do it yourself, or know someone you can. Melamine is available in 8x4 foot sheets (16 mm thick), for about $AU40. You only need one sheet to make a 4x2x2 foot enclosure. Then. $50 for glass, $20 for track (for the glass), and $10 for glue and sealant.
In the end, it's up to you.
Cheers,
Aaron.