Lately, I’m feeling more optimistic about the ability of brick-and-mortar stores to compete with their online brethren. The key to their salvation just might be using technology as a force for good.

Last week, I received an e-mail from my local wine emporium advertising a decent bottle of pinot noir at a bargain-basement price.

Once I would have trashed the offer, figuring by the time I got to the store the inventory would be gone.

But a link in the Total Wine e-mail allowed me to buy the bottle right then and there, and pick up 24 hours later.

Online shopping meets the physical world. Cha-ching.

I picked up my purchase on the way home from work; all I had to do was wave my receipt at the manager, who had my order already boxed up. I called my wife to tell her I was leaving and she asked me to stop for some carryout. She had just gone online, ordered off the Web menu, and forwarded me a text with the particulars.

Cha-ching, again.

This all happened a few days after we had taken in a movie, “Skyfall,” on its opening weekend, reserving our tickets online and avoiding the frustration of showing up at the theater for a sold-out show. Cha-ching, another satisfied customer.

Now, I know technology has it limits. I am no fan of those self-checkout lines, which rarely seem to be any more efficient than a good cashier. Scott Nash, the founder of Mom’s Organic Market, said as much in a recent blog post, explaining he likes the warm and fuzzy interaction with customers. At his grocery, the cashiers even carry your bags to your car. I like that.

But if someone would just invent an app allowing me to reserve a parking space at the shopping mall during the holidays, I might swear off Amazon for a while.