|
Rohaq posted:But to my other question: Anybody got any favourite regex testers in here?
|
# ¿ Oct 21, 2012 20:48 |
|
|
# ¿ May 2, 2024 07:08 |
|
Hughmoris posted:Does anyone have any recommended readings or tips for learning how to scrape a webpage with perl? My personal go-tos for that are WWW::Mechanize and HTML::Query. As an example, here's a recent thing I made, which scrapes some messages from a login-protected site to a JSON API.
|
# ¿ Apr 9, 2015 06:47 |
|
Hughmoris posted:I can't say I really understand what's going on here: while (my @vals = $it->()) When you call natatime , you get back a (reference to a) subroutine. Whenever you call this subroutine (i.e., the $it->() call), it gives you the n (in this case 3) next elements of the list you provided. The while-loop then terminates once there are no more values to return, since the empty list is a falsy value. If you're curious, you can see the implementation here.
|
# ¿ May 19, 2015 09:06 |
|
Mithaldu posted:For the intermediate arrow though, there is concensus. Generally only those who don't know about its optionality leave it in. I didn't know about this. So, dereferencing arrows are optional precisely when?
|
# ¿ Aug 14, 2015 19:12 |
|
I thought I'd share a small tool I find useful: perlopen It's basically just a small script that searches your include path for a specific package, and opens it in your editor. E.g. perlopen WWW::Mechanize Saves you some time from searching for the file if you want to, say, inspect the source of an installed CPAN module or whatnot.
|
# ¿ Aug 28, 2015 09:18 |
|
For anyone who hasn't seen it; there are livestreams of YAPC::NA on their YouTube channel.
|
# ¿ Jun 21, 2016 10:22 |
|
|
# ¿ May 2, 2024 07:08 |
|
Mithaldu posted:To be honest, i'm not entirely sure much world-shifting stuff happened? Subroutine signatures are pretty nice, too. And there's also the double diamond operator, which is worth knowing about, I suppose.
|
# ¿ Nov 9, 2016 10:40 |