in reply to scenarios to force list context

When I have a function that returns a list in list context and something else in scalar context, and I only want the first element, I use the following:

my ($field) = $mech->xpath( '//div' );