The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by chris]

Hi Dave,

great book though you really got me thinking about the hash slices that have
been mentioned here before.

One thing that won't work though is the regex for finding numbers. For example
on page 90 (bottom) you write "push @nums, $1" but $1 can't match the whole
regex because its not in parentheses.

And another question, is $p->get_tag('table') !! die [...] correct and if so
why? Or should it be || instead of !!?

Regards,

Christian
import-bot (20211) [Avatar] Offline
#2
Re: Number Regex
[Originally posted by dave]

> Hi Dave,
>
> great book though you really got me thinking about the hash slices that have
> been mentioned here before.

Thanks very much. I'm glad you're enjoying it.

> One thing that won't work though is the regex for finding numbers. For example
> on page 90 (bottom) you write "push @nums, $1" but $1 can't match the whole
> regex because its not in parentheses.

Absolutely right. Another one for the errata. Probably best to change the line
to

while ($data =~ /($num_re)/g) {

> And another question, is $p->get_tag('table') !! die [...] correct and if so
> why? Or should it be || instead of !!?

Yep. That's a typo. It should be

$p->get_tag('table') || die "..." foreach (1 .. 6);

For anyone else reading this - we're talking about page 173.

Thanks for pointing these problems out.

Dave...