Re: Regex help

2007-11-25 Thread Todd
See the codes below. The trick here is that $& is an special var used to capture the total match string. So in this case, the /[$&]/ regexp literal is equal to / [.type=xmlrpc&]/. #!/bin/perl $url = 'http://abc.com/test.cgi?TEST=1&.type=xmlrpc&type=2'; ($r1) = $url =~ /\.type=(.+?)(&|$)/; print "\

Re: Regex help

2007-11-25 Thread John W . Krahn
On Saturday 24 November 2007 22:59, Todd wrote: > See the codes below. The trick here is that $& is an special var used > to capture the total match string. > So in this case, the /[$&]/ regexp literal is equal to / > [.type=xmlrpc&]/. Right. And that is a character class which says to match *one

webcrawler - a concise idea but I need a little help.

2007-11-25 Thread Tobias L
Hi. I have got a little bit more serious idea than my last one, as an enthusiatisk chess player I would like if I could download a lot of .pgn files from the web. But I don't how to do some pseudo code could be like open_internet_connection { open_some_site search(*.pgn) download(*.pgn) } but

Re: webcrawler - a concise idea but I need a little help.

2007-11-25 Thread Tom Phoenix
On 11/25/07, Tobias L <[EMAIL PROTECTED]> wrote: > But I don't how to do some pseudo code could be like > > > open_internet_connection > { > open_some_site > search(*.pgn) > download(*.pgn) > } Sounds like you want WWW::Mechanize. http://search.cpan.org/dist/WWW-Mechanize/ > or better yet w

Date and Time and Function calls

2007-11-25 Thread AndrewMcHorney
Hello I am looking for a perl function or functions that will give me the date and time. I am going to use the results to create a unique file name. Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Date and Time and Function calls

2007-11-25 Thread yitzle
time will give you the number of seconds since the epoch. This is good so long as you don't expect to create two files in one second. http://perldoc.perl.org/functions/time.html "For measuring time in better granularity than one second, you may use either the Time::HiRes module (from CPAN, and sta

Re: Date and Time and Function calls

2007-11-25 Thread Tom Phoenix
On 11/24/07, AndrewMcHorney <[EMAIL PROTECTED]> wrote: > I am looking for a perl function or functions that will give me the > date and time. Are you looking in the perlfunc manpage? Type 'perldoc perlfunc' at a prompt (or into your favorite search engine) to get started. > I am going to use t

Re: Date and Time and Function calls

2007-11-25 Thread rahed
AndrewMcHorney <[EMAIL PROTECTED]> writes: > Hello > > I am looking for a perl function or functions that will give me the > date and time. I am going to use the results to create a unique file > name. There are many posibilities depending on uniqueness, this is quite similar: $randnum = 1000

Re: Date and Time and Function calls

2007-11-25 Thread Dr.Ruud
rahed schreef: > AndrewMcHorney: >> I am looking for a perl function or functions that will give me the >> date and time. I am going to use the results to create a unique file >> name. > > There are many posibilities depending on uniqueness, > this is quite similar: > > $randnum = 1000 + int r

Re: Date and Time and Function calls

2007-11-25 Thread Martin Barth
Hi Andrew, I would suggest http://search.cpan.org/~tjenness/File-Temp-0.19/Temp.pm HTH Martin On Sat, 24 Nov 2007 08:44:18 -0800 AndrewMcHorney <[EMAIL PROTECTED]> wrote: > Hello > > I am looking for a perl function or functions that will give me the > date and time. I am going to use the r

perl_eval_pv function crashing when creating Perl subroutine from a char string in CPP program

2007-11-25 Thread Borse, Ganesh
Hi, I am trying to create Perl subroutine in my C++ program, source code of which is given below -- attempt to embed Perl in C++ program. I cannot use the perl script file for this because the expressions to be evaluated are stored in database & are to be loaded at runtime. This program compile