We’d be answering this question down the story, but why would you want to drive a car without a gas cap when you can get its replacement for as much as $16?
They keep the fuel from getting evaporated into the atmosphere, with some theories suggesting their role in maintaining optimal fuel pressure.
In modern vehicles, you can see flapper valves preventing fuel from spilling rather than gas caps, which are left only to protect the gas from dirt and debris.
You would not want to drive your car long distances, but say from the spot of losing the cap to your mechanic’s shop; if it’s so necessary.