in reply to Can't call method "text" on an undefined value at usingmojo.pl line 11.
If you get a list of answers, why don't you just take the first element of that list?
I think your problem is in the structure of the HTML and that the #u element does not have the elements you want as its immediate children. I would restructure the CSS query to match all elements I want, and only these.
Another approach is to solve this by programming in Perl, and retrieving all answers and then only using the first.
|
|---|