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
---
--- 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
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
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,
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
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
.
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
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
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
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
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)
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
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 {
with this particular regex which was fixed in a later version.
- Perrin
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
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
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,
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
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
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
20 matches
Mail list logo