'' in regex

2002-05-18 Thread Rizwan Majeed
I was trying this out : $SomeVar =~ // ;$SomeVar =~ /''/ ;$SomeVar =~ /\/ ;none of these works. Need help Thanks Riz - Original Message - From: Mithun Bhattacharya [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 18, 2002 4:01 PM Subject: Re: Apache::DB ---

Re: '' in regex

2002-05-18 Thread Mithun Bhattacharya
--- Rizwan Majeed [EMAIL PROTECTED] wrote: I was trying this out : $SomeVar =~ // ; $SomeVar =~ /''/ ;$SomeVar =~ /\/ ;none of these works. Works for me in perl 5.6.1 [mithun@zorro mithun]$ perl -wT -e 'my $test = you \ me; print voila\n if $test =~ /\/;' voila Mithun

Re: '' in regex

2002-05-18 Thread Perrin Harkins
Rizwan Majeed wrote: I was trying this out : $SomeVar =~ // ;$SomeVar =~ /''/ ;$SomeVar =~ /\/ ;none of these works. Need help This list is for mod_perl questions. For beginner Perl questions, you should try one of the mailing lists at http://lists.perl.org/ or post your

[OT] Re: '' in regex

2002-05-18 Thread Per Einar Ellefsen
At 15:15 18.05.2002, Rizwan Majeed wrote: I was trying this out : $SomeVar =~ // ;$SomeVar =~ /''/ ;$SomeVar =~ /\/ ;none of these works. This is unrelated to mod_perl. Please ask your question somewhere related directly to Perl, such as the comp.lang.perl.misc newsgroup,

Re: slow regex [BENCHMARK]

2002-01-25 Thread Paul Mineiro
Paul Mineiro wrote: right. i probably should've mentioned earlier that CGAT x 5 is really fast in both mod_perl and command line. if anybody wants my actual $seq data, please let me know. i neglected to mention something big: the production version is identical but using perl

Re: slow regex [BENCHMARK]

2002-01-25 Thread Paul Mineiro
Rob Mueller (fastmail) wrote: I recently had a similar problem. A regex that worked fine in sample code was a dog in the web-server code. It only happened with really long strings. I tracked down the problem to this from the 'perlre' manpage. WARNING: Once Perl sees that you need one

Re: slow regex [BENCHMARK]

2002-01-24 Thread Paul Mineiro
. That's a possibility. I was also thinking that maybe mod_perl was built against a different version of Perl, possibly one that has a problem with this particular regex which was fixed in a later version. both mod_perl and the script are using the debian packaged perl/libperl, the perl -V dump

Re: slow regex [BENCHMARK]

2002-01-24 Thread Paul Mineiro
Robert Landrum wrote: I just ran this on my system here... It's completely unloaded (load average: 0.11, 0.08, 0.02) Result: 0 wallclock secs ( 0.06 usr + 0.00 sys = 0.06 CPU) @ 16.67/s (n=1) I ran it on a file that I created with perl -e print 'ABCGEFSK' x 25000 /tmp/seqdata

Re: slow regex [BENCHMARK]

2002-01-24 Thread Rob Mueller (fastmail)
I recently had a similar problem. A regex that worked fine in sample code was a dog in the web-server code. It only happened with really long strings. I tracked down the problem to this from the 'perlre' manpage. WARNING: Once Perl sees that you need one of $, $`, or $' anywhere

Re: slow regex [BENCHMARK]

2002-01-24 Thread Stas Bekman
Rob Mueller (fastmail) wrote: I recently had a similar problem. A regex that worked fine in sample code was a dog in the web-server code. It only happened with really long strings. I tracked down the problem to this from the 'perlre' manpage. WARNING: Once Perl sees that you need

Re: slow regex [BENCHMARK]

2002-01-23 Thread Paul Mineiro
Paul Mineiro wrote: i've cleaned up the example to tighten the case: the mod perl code snippet is: --- my @cg; open DIL, '', /tmp/seqdata; print DIL $seq; close DIL; warn length seq = @{[length ($seq)]}; my $t = timeit (1, sub { while ($seq =~ /CG/g)

Re: slow regex [BENCHMARK]

2002-01-23 Thread Sam Tregar
On Wed, 23 Jan 2002, Paul Mineiro wrote: i've cleaned up the example to tighten the case: the mod perl code snippet is: Fascinating. The only thing I don't see is where $seq gets assigned to in the CGI case. Where is the data coming from? Is it perhaps a tied variable or otherwise unlike

Re: slow regex [BENCHMARK]

2002-01-23 Thread Robert Landrum
At 4:01 PM -0800 1/23/02, Paul Mineiro wrote: Paul Mineiro wrote: i've cleaned up the example to tighten the case: the mod perl code snippet is: --- my @cg; open DIL, '', /tmp/seqdata; print DIL $seq; close DIL; warn length seq = @{[length ($seq)]}; my $t = timeit (1, sub {

Re: slow regex [BENCHMARK]

2002-01-23 Thread Perrin Harkins
with this particular regex which was fixed in a later version. - Perrin

slow regex [BENCHMARK]

2002-01-20 Thread Paul Mineiro
hi. i'm running mod_perl 1.26 + apache 1.3.14 + perl 5.6.1 i have a loop in a mod_perl handler like so: my $stime = time (); while ($seq =~ /CG/og) { push @cg, pos ($seq); } my $etime = time (); warn time was: , scalar localtime ($stime), , scalar

Re: slow regex [BENCHMARK]

2002-01-20 Thread Stas Bekman
Paul Mineiro wrote: hi. i'm running mod_perl 1.26 + apache 1.3.14 + perl 5.6.1 i have a loop in a mod_perl handler like so: my $stime = time (); while ($seq =~ /CG/og) { push @cg, pos ($seq); } my $etime = time (); warn time was: , scalar localtime

Re: slow regex [BENCHMARK]

2002-01-20 Thread Perrin Harkins
under mod_perl this takes 23 seconds. running the perl by hand (via extracting this piece into a seperate perl script) on the same data takes less than 1 second. Are you sure that the string you're regex'ing is the same in both cases? Why are you using the /o operator? CG isn't a variable,

Regex problem

2000-07-10 Thread Tu Nguyen
Hi all, Can somebody show me how to use regular expression to subtitute a string with speacial character such as [* , ?] in it ? for example $string = 'test ? test'; $input = 'Start test ? test End'; $change = 'Change'; $input =~ s/$string/$change/g; After change, I expect $input = 'Start

Re: Regex problem

2000-07-10 Thread Rodney Broom
The regex engine is seeing extra stuff in $string and thinking that you are trying to build an expression with it. To get Perl to handle $string as straight text, you need to quote it like this: $input =~ s/\Q$string\E/$change/g; Rodney Broom

[new module] Apache::Regex

2000-06-28 Thread Geoffrey Young
Hi all... I posted to the list a little while ago a simple regular expression PerlHandler implementation. I've cleaned it up since then and thought I might post it to CPAN if there is any interest. I was thinking of Apache::Regex as the release name. I know it's a basic module