Re: how to make use of $content in LWP

2007-09-17 Thread Chas Owens
On 9/17/07, Rob Dixon <[EMAIL PROTECTED]> wrote: > Chas Owens wrote: > > > > On 9/17/07, Jeff Pang <[EMAIL PROTECTED]> wrote: > >> > >> 2007/9/17, W. Sp. <[EMAIL PROTECTED]>: > >>> > >>> Also, while using LWP modules, what type of > >>> data is $content = get($url)? Is it an array? Is there a way t

Re: how to make use of $content in LWP

2007-09-17 Thread Chas Owens
On 9/17/07, Wagner, David --- Senior Programmer Analyst --- WGO snip > > If you want to print a line that is on a given line number you can say > > > > perl -ne 'print if $. = 400' file.txt > > $. == 400 and not $. = 400 ( assignment verses equality test ). > Wags ;) snip Yeah, I am an id

Re: how to make use of $content in LWP

2007-09-17 Thread Rob Dixon
Chas Owens wrote: On 9/17/07, Jeff Pang <[EMAIL PROTECTED]> wrote: 2007/9/17, W. Sp. <[EMAIL PROTECTED]>: Also, while using LWP modules, what type of data is $content = get($url)? Is it an array? Is there a way to find out what kind of data a particular variable stores? It's a scalar. you

RE: how to make use of $content in LWP

2007-09-17 Thread Wagner, David --- Senior Programmer Analyst --- WGO
> -Original Message- > From: Chas Owens [mailto:[EMAIL PROTECTED] > Sent: Monday, September 17, 2007 10:14 > To: W. Sp. > Cc: beginners@perl.org > Subject: Re: how to make use of $content in LWP > > On 9/16/07, W. Sp. <[EMAIL PROTECTED]> wrote: > snip

Re: how to make use of $content in LWP

2007-09-17 Thread Chas Owens
On 9/17/07, Jeff Pang <[EMAIL PROTECTED]> wrote: > 2007/9/17, W. Sp. <[EMAIL PROTECTED]>: > > Also, while using LWP modules, what type of > > data is $content = get($url)? Is it an array? Is there a way to find out > > what kind of data a particular variable stores? > > It's a scalar. > you can use

Re: how to make use of $content in LWP

2007-09-17 Thread Chas Owens
On 9/16/07, W. Sp. <[EMAIL PROTECTED]> wrote: snip > regex worked fine in my case. But my question was: how to specifically sift > out a particular line number. snip There is a global variable named $. that stores the current line number. So you can say things like perl -ne 'print $. if /this i

Re: how to make use of $content in LWP

2007-09-17 Thread Jeff Pang
2007/9/17, W. Sp. <[EMAIL PROTECTED]>: > Also, while using LWP modules, what type of > data is $content = get($url)? Is it an array? Is there a way to find out > what kind of data a particular variable stores? It's a scalar. you can use 'ref' to find out the variable type,like, $ perl -MLWP::Simp

Re: how to make use of $content in LWP

2007-09-17 Thread W. Sp.
thanks Chas. regex worked fine in my case. But my question was: how to specifically sift out a particular line number. Also, while using LWP modules, what type of data is $content = get($url)? Is it an array? Is there a way to find out what kind of data a particular variable stores? thanks raghu

Re: how to make use of $content in LWP

2007-09-14 Thread Chas Owens
On 9/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am looking for one particular line in an HTML page. How can I find > this in a perl program. > > Basically, I want to grep this one line containing what I know. snip A lot depends on how you can identify that line. The best solution is