From: Thomas Andersson on
Will this line update $page with a number if it's double digit (ie 10+) or
does the code need to change?

my ($page) = $page_number_txt =~ /PAGE (\d) >/;


From: RedGrittyBrick on
On 06/08/2010 21:00, Thomas Andersson wrote:
> Will this line update $page with a number if it's double digit (ie 10+) or

No, \d matches a single digit.

> does the code need to change?

Yes. E.g. change \d to \d+

>
> my ($page) = $page_number_txt =~ /PAGE (\d)>/;
>
>



--
RGB
From: Tad McClellan on
Thomas Andersson <thomas(a)tifozi.net> wrote:
> Will this line update $page with a number if it's double digit (ie 10+) or
> does the code need to change?
>
> my ($page) = $page_number_txt =~ /PAGE (\d) >/;


What happened when you tried it?


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
From: Thomas Andersson on
Tad McClellan wrote:
> Thomas Andersson <thomas(a)tifozi.net> wrote:
>> Will this line update $page with a number if it's double digit (ie
>> 10+) or does the code need to change?
>>
>> my ($page) = $page_number_txt =~ /PAGE (\d) >/;
>
> What happened when you tried it?

It's sorted now, basically my script processed pages and a had a function to
look for next page to see if it should continue. When page 10 came around it
bugged out as it found a page, but pagenumber was incorrectly set. Changing
to \d+ fixed it.