1) Apply this regex to the current value of $urls - or die. Since this is not going to be a match, the die happens. When you ask for a return from a regex in scalar context you get a true or false return. You should be getting falses and thus dying.
2) If the die() wasn't there, you'd be returning nothing to the getprint() call, in which case it would try to hit that URL, which would return nothing also.
What you're likely really wanting to do is to get the HTML from the URL and then apply the regex, right? So, in that case, use get() to retrieve the HTML into a variable and then apply your regex to that. Don't forget to use the /s modifier to cross newlines. I suppose you could do it in one line without the temp variable, but it's more clear to use the variable.
In reply to Re: HTTP::Request pipe through regex
by SheridanCat
in thread HTTP::Request pipe through regex
by zogness
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |