Parsing an HTML file - skipping to a line

2007-04-06 Thread yitzle
I got an HTML file I want to parse. I have it stored in an array or whatever. If I want to skip to a line and go from there, what's the best way? I'm thinking of doing something like: do { shift @input; } while ($input[0] =~ m/string-line to find/); (Or a while-do as needed. Whatev

Re: Parsing an HTML file - skipping to a line

2007-04-06 Thread Tom Phoenix
On 4/6/07, yitzle <[EMAIL PROTECTED]> wrote: I got an HTML file I want to parse. Then there's a module on CPAN to help you. HTML is very complex stuff. I have it stored in an array or whatever. If I want to skip to a line and go from there, what's the best way? I'm not sure what "skip to a

Re: Parsing an HTML file - skipping to a line

2007-04-06 Thread yitzle
I distrust modules? Dunno. I'm a fan of C programming and like doing stuff myself. Granted HTML is free form, but I'm parsing a webpage whose format likely will not change anytime soon, and if it did, even if I was using a module I would still need to fix up the script. I know exactly was format t

Re: Parsing an HTML file - skipping to a line

2007-04-06 Thread Rob Dixon
Tom Phoenix wrote: On 4/6/07, yitzle <[EMAIL PROTECTED]> wrote: I'm thinking of doing something like: do { shift @input; } while ($input[0] =~ m/string-line to find/); Real Perl programmers don't use indices. At least, not like that. I think real Perl programmers use indic

Re: Parsing an HTML file - skipping to a line

2007-04-06 Thread Chas Owens
On 4/6/07, Rob Dixon <[EMAIL PROTECTED]> wrote: Tom Phoenix wrote: > > On 4/6/07, yitzle <[EMAIL PROTECTED]> wrote: > >> I'm thinking of doing something like: >> >> do { >> shift @input; >> } while ($input[0] =~ m/string-line to find/); > > Real Perl programmers don't use indices.

Re: Parsing an HTML file - skipping to a line

2007-04-06 Thread Tom Phoenix
On 4/6/07, yitzle <[EMAIL PROTECTED]> wrote: I distrust modules? Dunno. I'm a fan of C programming and like doing stuff myself. I distrust the dairy industry. I've got a yard full of grass for cows to eat, and I've seen what milking a cow looks like on Animal Planet. I can figure out how to pa