Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Re: Poor man's Foongrep for dutch telephonenumbersby teabag (Pilgrim) |
on Jun 01, 2003 at 18:55 UTC ( [id://262242]=note: print w/replies, xml ) | Need Help?? |
>I should have used LWP::Simple and so should you :)
>This is copy/paste-programming, I think. I used LWP::UA
was part of my first version. I just changed the fetching of the page and used the, "in you own words", bad method you used. Just calling it copy/paste is not entirely fair I think, but hey, I gotta admit, you're a far better coder than me.
>So !!!!!!!!!!!!!!hallo wereld!!!!!!@#$@#$%^#$%^#$%^#"$%#$%#"$%"#$%#$%"#$%123-4567890!!!!!!!!!! is a valid Dutch phone number? Nope, it isn't. And according to testing on my windows machine and my linux machine this tiny utility doesn't think it is either. As for 06 numbers, they are not listed on this site , so it's pretty useless to check for them, and the same goes for servicenumbers, I guess that's what you're aiming at with the three-digit area number and a 6-digit subscriber number. You're totally right about the sloppy matches and about the the unnecessary "ignore case" substitution. So here's a rewitten version that fixes (most of) those mistakes and remarks. Oh, and using LWP::Simple ;)
Teabag Sure there's more than one way, but one just needs one anyway - Teabag
In Section
Cool Uses for Perl
|
|