Re: Beginner Reg.Expression Question

2007-10-12 Thread Matthew Whipple
Sorry I prefer messages where the point is easily visible rather than having to scroll down to the bottom of a thread of things that people have read several times over and don't see the need to place simple concepts in context (particularly when sufficient context is left afterward). My response

Re: HTML::Parser does give any result of its "sub text{...}".

2007-10-12 Thread Tom Phoenix
On 10/12/07, Patrik Hasibuan <[EMAIL PROTECTED]> wrote: > Please tell me my mistake. I'll catch enough to give you something to do, and leave the rest for you and others to find. :-) > use HTML::Parser; It looks as if you're not subclassing HTML::Parser. Isn't that obligatory? Jenda already gav

Re: HTML::Parser does give any result of its "sub text{...}".

2007-10-12 Thread Patrik Hasibuan
Dear Jenda and friends... I modified the code but the result is still empty. Please tell me my mistake. === Here is my current code: #!/usr/bin/perl -w use strict; use LWP::UserAgent; use HTML::Parser; my @result=''; my @judul=''; my @bodi=''; my $tekshslparse=''; my $title=''; my $body=''; my

Re: Beginner Reg.Expression Question

2007-10-12 Thread Jenda Krynicky
From: "Dr.Ruud" <[EMAIL PROTECTED]> > "Jenda Krynicky" schreef: > > Dr.Ruud: > > Try > > > > print( (1.2.3 eq '1.2.3') ? 'yes' : 'no'); > > $ perl -wle 'print sprintf("%vd", 1.2.3) eq "1.2.3" ? "y" : "n"' > y So you proved that you can convert a version string into an ordinary one. Now the o

Re: HTML::Parser does give any result of its "sub text{...}".

2007-10-12 Thread Jenda Krynicky
From: Patrik Hasibuan <[EMAIL PROTECTED]> > I want to parse HTML files those I retrieve with "LWP::UserAgent". For the > parsing I use "HTML::Parser". > But the parsing process does not give any result. I still do not understand > the documentation those I get from > - http://ww

HTML::Parser does give any result of its "sub text{...}".

2007-10-12 Thread Patrik Hasibuan
Dear my friends... I want to parse HTML files those I retrieve with "LWP::UserAgent". For the parsing I use "HTML::Parser". But the parsing process does not give any result. I still do not understand the documentation those I get from - http://www.foo.be/docs/tpj/issues/vol5_1/tpj0501-0003.html

Re: Beginner Reg.Expression Question

2007-10-12 Thread Dr.Ruud
"Jenda Krynicky" schreef: > Dr.Ruud: >> Matthew Whipple: >>> Dr.Ruud: Tatiana Lloret Iglesias: > What regular expression do I need to convert > Version: 1.2.3 to > Version: 1.2.4 ? > > I.e. my pattern is Version: number.number.number and from that i > need Version:

Re: String Length and Accessing Individual Characters

2007-10-12 Thread Tom Phoenix
On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 1. How does one determine the length of a string? Have you seen the perlfunc manpage? There is a length function. > 2. How does one extract an individual character of a string? Generally, with a pattern match. But there's also a substr

Re: String Length and Accessing Individual Characters

2007-10-12 Thread yitzle
#!/usr/bin/perl my $string = "abcde"; print "The length of $string is " . length ($string) . "\n"; print "The substring of $string from 2, 2 chars long, is " . substr($string, 2, 2) . "\n"; See http://perldoc.perl.org/functions/substr.html and http://perldoc.perl.org/functions/length.html in reve

String Length and Accessing Individual Characters

2007-10-12 Thread andrewmchorney
Hello I am working with strings and I have the following 2 questions. 1. How does one determine the length of a string? 2. How does one extract an individual character of a string? Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://

Re: Beginner Reg.Expression Question

2007-10-12 Thread Rob Dixon
Dr.Ruud wrote: "Tatiana Lloret Iglesias" schreef: What regular expression do I need to convert Version: 1.2.3 to Version: 1.2.4 ? I.e. my pattern is Version: number.number.number and from that i need Version: number.number.number+1 After the : i can have a space or not... Why use a rege

Re: Split question

2007-10-12 Thread Matthew Whipple
There's a comma in the example data provided. Most of the CSV's I've dealt with also quote values which were strings. If this is the case, an ugly solution would be to use something along the lines of '","' as the delimiter, take into account any possible fields which aren't quoted (it should be

Re: Split question

2007-10-12 Thread yitzle
On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > One of the column in csv file is Fri, Oct 12 10:32 AM. I am trying ti split > the csv file for checking a column value. when spliting I wanted to take Fri, > Oct 12 10:32 AM as a single value. How can I use split? > > Thanks > Manoj If

Re: Split question

2007-10-12 Thread Tom Phoenix
On 10/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > One of the column in csv file is Fri, Oct 12 10:32 AM. I am trying ti split > the csv file for checking a column value. when spliting I wanted to take > Fri, Oct 12 10:32 AM as a single value. How can I use split? You don't want split fo

Split question

2007-10-12 Thread manojkumarg
One of the column in csv file is Fri, Oct 12 10:32 AM. I am trying ti split the csv file for checking a column value. when spliting I wanted to take Fri, Oct 12 10:32 AM as a single value. How can I use split? Thanks Manoj -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: WWW::Mechanize

2007-10-12 Thread Paul Lalli
On Oct 11, 3:31 pm, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > On 11 Oct, 16:20, [EMAIL PROTECTED] (Paul Lalli) wrote: > Paul, sorry the issue is that it doesn't work :) That's a phenomenally bad error description. Only *you* know what you want your script to do. None of us have any way of k

Re: copy site contents into pdf file.

2007-10-12 Thread Matthew Whipple
Do you want to create one large PDF? First you need to think about the problem as more of a sequential ordering of information since PDF's don't have hyperlinks. Is this a stripped down example or are you really only dealing with a handful of webpages? Also, is this static data you're dealing wi

Re: Beginner Reg.Expression Question

2007-10-12 Thread Jenda Krynicky
From: "Dr.Ruud" <[EMAIL PROTECTED]> > Matthew Whipple schreef: > > Dr.Ruud: > >> Tatiana Lloret Iglesias: > > >>> What regular expression do I need to convert Version: 1.2.3 to > >>> Version: > >>> 1.2.4 ? > >>> > >>> I.e. my pattern is Version: number.number.number and from that i > >>> nee

Re: WWW::Mechanize

2007-10-12 Thread [EMAIL PROTECTED]
On 11 Oct, 16:20, [EMAIL PROTECTED] (Paul Lalli) wrote: > On Oct 11, 8:35 am, [EMAIL PROTECTED] > > ([EMAIL PROTECTED]) wrote: > > Hi, I've been playing around with the following script as I would like > > to access data on a website that I need to log into first. > > > As you can see I'm attemptin

Re: Beginner Reg.Expression Question

2007-10-12 Thread Dr.Ruud
Matthew Whipple schreef: > Dr.Ruud: >> Tatiana Lloret Iglesias: >>> What regular expression do I need to convert Version: 1.2.3 to >>> Version: >>> 1.2.4 ? >>> >>> I.e. my pattern is Version: number.number.number and from that i >>> need Version: number.number.number+1 >>> After the : i can

Re: system() function not executing scripts

2007-10-12 Thread Jeff Pang
Are you running a redirector for squid?Where do you put these scripts?Does Squid has privileges to access the scripts dir and run the scripts?What did you see in cache.log? the last,if you can post some codes here,it should be more helpful. 2007/10/12, Gregory Machin <[EMAIL PROTECTED]>: > Hi > I'

system() function not executing scripts

2007-10-12 Thread Gregory Machin
Hi I'm porting a script for one linux distro to another. but hit a problem, the main script is called by squid and runs as a service for squid, this script then calls other scripts depending on the action needed thought the system() function. The problem is it's not executing these scripts, i have

Re: Can I modify the contents of a file, without creating a new one?

2007-10-12 Thread Ron Bergin
On Oct 11, 4:25 am, [EMAIL PROTECTED] (Jeff Pang) wrote: > 2007/10/11, PeiYu Zeng <[EMAIL PROTECTED]>: > > > Hello, > > > Can I modify the contents of a file, without creating a new one? > > Yes.You can use perl one-liner to do that, > > perl -pi.bak -e 'modify the current line if it match some con

Re: Need advise on sending .eml attachment

2007-10-12 Thread Panda-X
2007/10/12, Matthew Whipple <[EMAIL PROTECTED]>: > > I'll leave Jenda to answer whether it's a good use of his module. > > I'd say if this works for your situation then it works (if there aren't > any problems with the users whose mail you are forwarding and their mail > clients). I'd still advoca

Re: Can I modify the contents of a file, without creating a new one?

2007-10-12 Thread Ron Bergin
On Oct 11, 2:37 am, [EMAIL PROTECTED] (PeiYu Zeng) wrote: > Hello, > > Can I modify the contents of a file, without creating a new one? > > Now, the method that I modify the contents of a file is: > open( READHANDLE , "sourceFile" ); > open( WRITEHANDLE, ">destiFile" ); > > foreach my $