Why do I have to call the find_all_links function with no arguments to it so my @links array gets filled?Perhaps you were distracted by the multi-line statement?
This:
my @links = map {$_->text} grep {$_->text =~ m/^\d+$/} $mech->find_all_links();
is equivalent to this:
my @links = map {$_->text} grep {$_->text =~ m/^\d+$/} $mech->find_all +_links();
(When I first read the original, I didn't see the lack of semicolon on line 1, which made me think it was an example from Damian's time reversed variables.)
Then read right to left.
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re^3: How can I retrieve the link with the highest number in it using Perl?
by QM
in thread How can I retrieve the link with the highest number in it using Perl?
by virtus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |