I'm planning to do my very first batch soon and I just wanted to know if it's ok to use a 6 1/2 gal carboy first then a 5 gal carboy as a secondary. Does the extra space in the larger carboy matter? I know a bit about wine but nothing about beer.

It's not going to effect it much. I do 2 gallon batches in a 5 gallon carboy on a pretty regular basis. Also, it seems that the thing to do these days is to let it sit in the primary instead of racking to a secondary.

You want a little extra space in your primary to reduce chances that the krauzen (foam produced by fermentation) bursts through your airlock. Once primary fermentation is done, transferring to a 5gal secondary is totally ok.

Something to think about, a lot of people around homebretalk don't secondary at all, and instead leave it in primary for +/- 3 weeks to minimise chances of infection (less moving/less equipment = less chance of infection)

How big is your batch? Headspace doesn't matter much in the primary because all the CO2 generated pushes out the oxygen and acts like a blanket on top of your beer because it's heavier than air. Plus you want to leave enough room for the krausen to rise and fall. Depending on the beer you're making I would say just skip the secondary. But if you use a secondary headspace is a little more of an issue, but not much. The disturbance of transfering should release enough CO2 to fill the headspace of the secondary. As long as all the beer will fit in the secondary you should be fine because you don't have to worry about a krausen.