Does Illustrator CS5 have a similar function?
Yes. But it's sort of hidden in CS5....
For Illustrator CS6 or older....
Select an object and grab the Free Transform Tool

Now.. in this order.. you must follow this order....
- Click a corner handle (but do not move the handle)
- Hold down the Command/Ctrl+Option/Alt+Shift keys
- Drag the handle
This will create a Perspective Distortion on the object as you drag.
Again, this only works if you follow the specific order of steps above using the Free Transform Tool. This won't work with the standard bounding box or any other tool.
This is a CS6 animation, which is as close to CS5 as I can get on my systems.

For Illustrator CC versions
The Free Transform Tool (e)

If you click the tool, you are presented with a popup tool bar... Perspective Distort is on that popup...

Click the Perspective Distort Tool and then click-drag a corner handle on the object you wish to distort.
-- The shortcut posted above for older versions will also still work in any newer version of Illustrator -- and the order of the steps still must be followed.
Be aware you can not distort linked/embedded raster images with this. These tools/shortcuts only work with native vector objects and/or groups. To distort linked/embedded raster images, see Andrew's method in the other answer.