http://qs321.pair.com?node_id=646435


in reply to A regex on the same content fails and works, with conditions

I get the impression that the data in $html and the data in $item_id is not exactly the same. One thing that might not be the same is newlines. Newlines don't play well with regular expressions unless you tell your expression that you want it to ignore them in the buffer variable.

my ($other, $author) = $html =~ \?author=(.*?)">(.*)<\/a>/s; #---------------------------------------------------------^

Just a stab in the dark here, assuming all other things are equal.