Hi, whats the right way to precompile a regular expression that gets used multiple
times without changing.
I don't think I can use /o, because the specific line of code which performs the
pattern match is used to check various patterns against various values at various
times. None the less,
Since we're now talking about performance issues, somebody should say something about
precompiling the regular expression, when you can, with either /o or qr(). I had a
process's running time go from 2min 45sec to just under 24sec simply by using qr on
the relevant regular expressions.
Robert
Hi list,
This question has to do with the ref() built-in function and its return values.
I see that one possible return value is 'REF', which I am inferring to mean that the
argument given to ref() is a reference to a scalar which is itself a reference.
However, I have not seen this documen
If you choose software engineering as a career you'll prolly learn like 25 languages.
Perl is just so damn handy -- it's easy to do things you'll frequently want to do --
that it's likely to be one of them. If you're not a software engineer, then Perl is a
good language for casual programmers
I'm working on a clone method for an object (which makes a deep copy of the data
structure and all other data structures 'contained' by it). I'm trying to create a
new reference that refers to the same thing an existing reference points to, but is
actually a separate reference, so that you get
James Edward Gray II <[EMAIL PROTECTED]> wrote:
>I believe you just want:
>
>$new = $orig;
>
>You're trying to copy the reference and = generally means copy.
>
>> print "orig:$orig, new:$new\n";
True, but ... (1) the requirement for a deep copy is that you can modify anything in
the origina
Hi list,
Does anyone have experience using GraphViz::Data::Structure
(http://search.cpan.org/~mcmahon/GraphViz-Data-Structure-0.07/lib/GraphViz/Data/Structure.pm)
on Win32, and what was your experience? Did you get useful results with it and how
many hoops did you have to jump through? Did y
Hi list,
1. Does anyone know of a module in CPAN which lets you implement the netstat function
within Perl code? I was expecting to see something like netstat.pm, but a CPAN search
turned up nothing.
2. If there's no such module, why not? Any guesses? It's seems like the kind of
thing that g
Hi, Can anyone tell me about using DProf on Win32 and to what extent I can expect
meaningful results at all.
I'm looking at the following output from DProf and it looks suspect. I'm guessing
this has to do with the lack of a high-resolution timer.
For example:
- elapsed time is negative?
Hi, I'm considering upgrading from ActiveState Perl 5.6.1 to 5.8.2 (in order to use
the latest Apache and mod_perl, although that's kind of beside the point).
Unfortunately, being a Perl beginner, I've installed CPAN modules by a variety of
methods including:
- manually downloading the .zip from
Hi, I'm getting an error when trying to install Text::Diff with the CPAN module. The
specific error is:
*snip*
Checking if your kit is complete...
Looks good
Warning: prerequisite Algorithm::Diff 0 not found.
Error: Unable to locate installed Perl libraries or Perl source c
Hi, this question has to do with importing names from one package into another. In my
case, both packages reside in the same file, and I simply want to import all the
package-global symbols from the one package into the other. Can anyone say how to do
this? Here's a bunch of tries that didn't
"Wiggins d Anconia" <[EMAIL PROTECTED]> wrote:
>
>
>> Hi, this question has to do with importing names from one package into
>another. In my case, both packages reside in the same file, and I
>simply want to import all the package-global symbols from the one
>package into the other. Can anyone s
[.. old posts snipped ..]
One important difference between 'use' and 'require' has to do with allowing your
program to decide whether to include it or not.
You CAN put 'require' inside an if statement, and it will only be executed if the if
condition is true, allowing your program to decide whe
"Nilay Puri, Noida" <[EMAIL PROTECTED]> wrote:
>Can any one walk me thru this piece of code ::
>
>while()
>{
>chomp ;
>$isbn =(split(/^_/, $_))[0] ; --- not able to understand what is
>being accessed (..)[0]
>unless ($KEYS{$isbn} ) isbn is a scalar variable, how keys
>wok
Hi, this message is to let you know the resolution of an issue I posted on 25 Jan
2004. I post this for the benefit of anyone Googling on the relevent keywords.
My original post listed an error message for a condition in which neither CPAN.pm,
CPANPLUS.pm nor Makefile.PL (for multiple packages)
Hi,
Is there a way for a subroutine to tell when it got passed a FILEHANDLE?
Running a quick test suggests a way, which is to check the first char of the result of
interpolating the subroutine param as a string. Can anyone say whether this is robust
and if not what might be a better approach?
17 matches
Mail list logo