[28534] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 9898 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 27 14:05:52 2006

Date: Fri, 27 Oct 2006 11:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 27 Oct 2006     Volume: 10 Number: 9898

Today's topics:
    Re: ActiveState Perl crashs, why ? <sisyphus1@nomail.afraid.org>
    Re: ActiveState Perl crashs, why ? <glex_no-spam@qwest-spam-no.invalid>
        activestate perl via shell() on XP, module location pro <spam.meplease@ntlworld.com>
    Re: activestate perl via shell() on XP, module location <sisyphus1@nomail.afraid.org>
    Re: activestate perl via shell() on XP, module location <spam.meplease@ntlworld.com>
        backup via ftp, depth copy, script already out there? <drubnone@yahoo.com>
    Re: backup via ftp, depth copy, script already out ther <drubnone@yahoo.com>
    Re: backup via ftp, depth copy, script already out ther <glex_no-spam@qwest-spam-no.invalid>
    Re: backup via ftp, depth copy, script already out ther <drubnone@yahoo.com>
    Re: backup via ftp, depth copy, script already out ther <drubnone@yahoo.com>
    Re: Check box use <scobloke2@infotop.co.uk>
    Re: FAQ 4.29 How can I count the number of occurrences  <drubnone@yahoo.com>
        Headers in Mail::DomainKeys 0.88 <admin@asarian-host.net>
    Re: Naive threading performance questions <worky.workerson@gmail.com>
    Re: PPM is missing...? <sisyphus1@nomail.afraid.org>
        Reducing file length in Perl? <nospam@thanksanyway.org>
    Re: Reducing file length in Perl? usenet@DavidFilmer.com
    Re: Store multi-dimensions array for use in latter form <tzz@lifelogs.com>
    Re: Store multi-dimensions array for use in latter form <shareparadise@gmail.com>
    Re: Store multi-dimensions array for use in latter form <sbryce@scottbryce.com>
    Re: Store multi-dimensions array for use in latter form xhoster@gmail.com
        System::DProf and system() <clement.rezvoy@gmail.com>
    Re: System::DProf and system() xhoster@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 27 Oct 2006 23:24:38 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: ActiveState Perl crashs, why ?
Message-Id: <454209b7$0$5106$afc38c87@news.optusnet.com.au>


"perl" <someone@somewhere.none> wrote in message
 .
 .
> I detected an older
> version of ActiveState Perl (5.6.1) which was also installed. I simply
> removed both ones and reinstalled the actual 5.8.8. Now it seems to work.
>

Perl 5.6.1 and 5.8.8 are "binary incompatible". The error you reported is
fairly typical of what happens when the perl 5.8.8 executable finds a binary
built for perl 5.6.1 (or, conversely, when the perl 5.6.1 executable finds a
binary built for 5.8.8).

By removing the older version of perl, you've eliminated one way for a
"binary incompatibility" to arise :-)

Cheers,
Rob




------------------------------

Date: Fri, 27 Oct 2006 10:32:58 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: ActiveState Perl crashs, why ?
Message-Id: <4542267d$0$509$815e3792@news.qwest.net>

perl wrote:
>>> The error message i got is the typical
>>> popup window (translated from german):
>>> perl.exe caused an error an will be closed.
>> Ouch. That sounds bad.
>>
>> I think LWP is pure perl, otherwise I'd first think of an incompatible
>> DLL from a module somewhere.
>>
>> Can you reproduce it, or not reproduce it, with other modules?
> 
> I had the same kind of crash with XML:Twig. [...]

Maybe if you tried XML::Twig it would have helped. :-)


------------------------------

Date: 27 Oct 2006 08:14:00 -0700
From: "doolittle" <spam.meplease@ntlworld.com>
Subject: activestate perl via shell() on XP, module location problem
Message-Id: <1161962040.123730.117540@m73g2000cwd.googlegroups.com>

Hi,

I have a perl program - mymodscript.pl - which works from the command
line on XP, but when i try to run it from visual basic with the
shell("perl mymodscript.pl") command, it complains that it can't find
mymodule.pm.

mymodule.pm is one that i have written (and which mymodscript.pl
needs), and put in the same directory as mymodscript.pl.

I know that the shell command works because if i change mymodscript.pl
so that it doesn't need mymodule.pm, it works both from the command
line and from visual basic using shell("perl myscript.pl")

I have tried using perl -I path-to-my-modules, but that didn't work.

Does anyone have an explanation?

thanks



------------------------------

Date: Sat, 28 Oct 2006 02:22:52 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: activestate perl via shell() on XP, module location problem
Message-Id: <4542337d$0$21511$afc38c87@news.optusnet.com.au>


"doolittle" <spam.meplease@ntlworld.com> wrote in message
 .
 .
>
> mymodule.pm is one that i have written (and which mymodscript.pl
> needs), and put in the same directory as mymodscript.pl.
>

There's a bit of a trap there. The fact that 'mymodule.pm' is in the same
directory as 'mymodscript.pl' doesn't really count for much.
What *is* important is that 'mymodule.pm' is in @INC.

On Win32, that will *typically* (but not necessarily) mean that
'mymodule.pm' has to be in either 'C:\perl\lib', 'C:\perl\site\lib' or the
cwd (current working directory).

To  check all of this, your 'mymodscript.pl' could (untested):

use Cwd;
print getcwd, "\n";
for(@INC) { print "$_\n" unless $_ eq '.'}

If 'mymodule.pm' is not located in *any* of the specified locations, then
that's your problem.

Cheers,
Rob




------------------------------

Date: 27 Oct 2006 10:59:28 -0700
From: "doolittle" <spam.meplease@ntlworld.com>
Subject: Re: activestate perl via shell() on XP, module location problem
Message-Id: <1161971968.511306.97870@b28g2000cwb.googlegroups.com>

Thanks for the suggestion, i think i understand (a bit of) whats going
on:

The shell("mymodscript.pl") command runs in

C:/Documents and Settings/ibm/My Documents

this 'works' somehow although mymodscript.pl isn't in this directory,
its in

C:/Documents and Settings/ibm/My Documents/perl

which is where the modules are, which is why perl can't find them.

So i could put the module in C:/Perl/site/lib, or alter @INC to include

C:/Documents and Settings/ibm/My Documents/perl



------------------------------

Date: 27 Oct 2006 06:09:13 -0700
From: "werwer" <drubnone@yahoo.com>
Subject: backup via ftp, depth copy, script already out there?
Message-Id: <1161954553.415189.272170@m73g2000cwd.googlegroups.com>

Is there a Net::FTP script already out there which does an in depth
copy from
a given point in a directory structure and copies and recreates the
directory
structure where the files are saved?



------------------------------

Date: 27 Oct 2006 06:14:56 -0700
From: "werwer" <drubnone@yahoo.com>
Subject: Re: backup via ftp, depth copy, script already out there?
Message-Id: <1161954896.465866.141440@m7g2000cwm.googlegroups.com>


werwer wrote:
> Is there a Net::FTP script already out there which does an in depth
> copy from
> a given point in a directory structure and copies and recreates the
> directory
> structure where the files are saved?

I should add that the perl script will run from the backup site; going
out
and collecting files to be stored.



------------------------------

Date: Fri, 27 Oct 2006 10:31:22 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: backup via ftp, depth copy, script already out there?
Message-Id: <4542261d$0$509$815e3792@news.qwest.net>

werwer wrote:
> werwer wrote:
>> Is there a Net::FTP script already out there which does an in depth
>> copy from
>> a given point in a directory structure and copies and recreates the
>> directory
>> structure where the files are saved?
> 
> I should add that the perl script will run from the backup site; going
> out and collecting files to be stored.
> 

Not a perl solution, but 'rsync' works well, otherwise 'tar' the files, 
maybe compress it, FTP it, and untar/uncompress it. What issues are you 
having?

Post what you've tried or search for a similar solution on the Internet.


------------------------------

Date: 27 Oct 2006 08:46:19 -0700
From: "werwer" <drubnone@yahoo.com>
Subject: Re: backup via ftp, depth copy, script already out there?
Message-Id: <1161963979.317014.139750@h48g2000cwc.googlegroups.com>

We can't count on IT to backup properly.  We need to copy our work to
our local
Win box drives to INSURE we don't loose work.  It it isn't written in
COBAL, it
seems, it aint worth backing up.  :-)


J. Gleixner wrote:
> werwer wrote:
> > werwer wrote:
> >> Is there a Net::FTP script already out there which does an in depth
> >> copy from
> >> a given point in a directory structure and copies and recreates the
> >> directory
> >> structure where the files are saved?
> >
> > I should add that the perl script will run from the backup site; going
> > out and collecting files to be stored.
> >
>
> Not a perl solution, but 'rsync' works well, otherwise 'tar' the files,
> maybe compress it, FTP it, and untar/uncompress it. What issues are you
> having?
>
> Post what you've tried or search for a similar solution on the Internet.



------------------------------

Date: 27 Oct 2006 08:51:13 -0700
From: "werwer" <drubnone@yahoo.com>
Subject: Re: backup via ftp, depth copy, script already out there?
Message-Id: <1161964273.725584.20440@i3g2000cwc.googlegroups.com>

I'm not up on TAR, but great idea!
We could remote that command, check for completed, then just copy
the tar file.  Hey, that's it!  Thanks.


werwer wrote:
> We can't count on IT to backup properly.  We need to copy our work to
> our local
> Win box drives to INSURE we don't loose work.  It it isn't written in
> COBAL, it
> seems, it aint worth backing up.  :-)
>
>
> J. Gleixner wrote:
> > werwer wrote:
> > > werwer wrote:
> > >> Is there a Net::FTP script already out there which does an in depth
> > >> copy from
> > >> a given point in a directory structure and copies and recreates the
> > >> directory
> > >> structure where the files are saved?
> > >
> > > I should add that the perl script will run from the backup site; going
> > > out and collecting files to be stored.
> > >
> >
> > Not a perl solution, but 'rsync' works well, otherwise 'tar' the files,
> > maybe compress it, FTP it, and untar/uncompress it. What issues are you
> > having?
> >
> > Post what you've tried or search for a similar solution on the Internet.



------------------------------

Date: Fri, 27 Oct 2006 16:09:53 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: Re: Check box use
Message-Id: <N9-dnWvycZDfvN_YRVnyvA@bt.com>

krakle@visto.com wrote:
> 
> On Oct 26, 5:09 am, Ian Wilson <scoblo...@infotop.co.uk> wrote:
> 
>> Kuna wrote:
>> 
>>> Hi All,
>> 
>>> I need a help in a perl script.
 >>
>> That is a nice short sentence,
>> easy to understand. It is superfluous but 
>> at least it is good English (though you should capitalize Perl).
> 
> I guess Ian Wilson thinks English is the only language in the World. 
> News flash, not everyone speaks English

Poor guess.

If I can't understand a posting written in English then it is probable
that many people for whom English is a second language will have also
have trouble understanding the poster.

If you are going to post in English I'd say it is a good idea to make
your best effort at being readable. Otherwise post Perl (which ISTR I
did also advise).

> but many people try to learn our language to communicate with us. You
> should feel honored...

If Kuna is trying to learn, then he should be happy that I specifically
pointed out how he could make himself better understood.

When I post a problem to c.l.p.m I'm honoured that anybody takes the 
time to respond, especially if it is to point out how I could 
communicate my problem better.


> Intead of helping someone out

If I could understand his posting I would have helped with the Perl
problem. Check out his posting history. Last time Kuna posted, I helped
  and Kuna thanked me for my help.

This time I couldn't help, simply
because I found his posting too difficult to understand.


> we critisize their spelling, grammer and punctuation.

Wrong. In order to be able to help Kuna, I suggested how he could make 
himself better understood. I regard that as helping someone more than as 
merely criticizing them.


------------------------------

Date: 27 Oct 2006 06:29:42 -0700
From: "werwer" <drubnone@yahoo.com>
Subject: Re: FAQ 4.29 How can I count the number of occurrences of a substring within a string?
Message-Id: <1161955782.576895.233190@h48g2000cwc.googlegroups.com>

$count = split(/this/, $s);


PerlFAQ Server wrote:
> This is an excerpt from the latest version perlfaq4.pod, which
> comes with the standard Perl distribution. These postings aim to
> reduce the number of repeated questions as well as allow the community
> to review and update the answers. The latest version of the complete
> perlfaq is at http://faq.perl.org .
>
> --------------------------------------------------------------------
>
> 4.29: How can I count the number of occurrences of a substring within a string?
>
>     There are a number of ways, with varying efficiency. If you want a count
>     of a certain single character (X) within a string, you can use the
>     "tr///" function like so:
>
>             $string = "ThisXlineXhasXsomeXx'sXinXit";
>             $count = ($string =~ tr/X//);
>             print "There are $count X characters in the string";
>
>     This is fine if you are just looking for a single character. However, if
>     you are trying to count multiple character substrings within a larger
>     string, "tr///" won't work. What you can do is wrap a while() loop
>     around a global pattern match. For example, let's count negative
>     integers:
>
>             $string = "-9 55 48 -2 23 -76 4 14 -44";
>             while ($string =~ /-\d+/g) { $count++ }
>             print "There are $count negative numbers in the string";
>
>     Another version uses a global match in list context, then assigns the
>     result to a scalar, producing a count of the number of matches.
>
>             $count = () = $string =~ /-\d+/g;
>
>
>
> --------------------------------------------------------------------
>
> The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
> are not necessarily experts in every domain where Perl might show up,
> so please include as much information as possible and relevant in any
> corrections. The perlfaq-workers also don't have access to every
> operating system or platform, so please include relevant details for
> corrections to examples that do not work on particular platforms.
> Working code is greatly appreciated.
>
> If you'd like to help maintain the perlfaq, see the details in
> perlfaq.pod.
> 
> -- 
> Posted via a free Usenet account from http://www.teranews.com



------------------------------

Date: Fri, 27 Oct 2006 16:20:56 +0200
From: "Mark" <admin@asarian-host.net>
Subject: Headers in Mail::DomainKeys 0.88
Message-Id: <0NCdnR_dLOhViN_YRVnyhA@giganews.com>

Hello,

Using Mail::DomainKeys 0.88, and Perl 5.8.8, how can I tell the signing
mechanism which headers to sign? (what will be visible on the h= line in
the signature header).

The code mentions something of a "headerlist", but it's all very opaque,
and, frankly, the documentation leaves to be desired.

- Mark




------------------------------

Date: 27 Oct 2006 09:19:21 -0700
From: "Worky Workerson" <worky.workerson@gmail.com>
Subject: Re: Naive threading performance questions
Message-Id: <1161965961.357293.211520@k70g2000cwa.googlegroups.com>

> It seems pretty weird that Text::CSV_XS would be slower than a database
> load. I'm not sure I'd give up on that avenue for optimization quite yet.
> Can you post an example of some data and code, and the top several subs
> from dprofpp?  Maybe we can spot something that isn't going as well as it
> could be. Of course, if parallelization turns out to be easy and
> successful, then there is probably not point in delving too deeply.  Is
> your data in ASCII/bytes, or in a wide character set?

You're right, its me.  I came up with the following example which is
very similar to one of my data sets and loads, and basically shows that
I can do a lot better.

The input file line is of the form:

IP/MASK [key=value][:key=value]

where there are a limited set of known keys, however each key isn't
necessarily present in the input line, however a (empty) CSV slot for
it must be present in the output line.  The keys and values are all
ASCII in this particular load (which is not true of all my data
sources), except for a couple of odd characters here and there, which
can be safely deleted.  A sample line would be:

0.0.0.0/0 keya=vala:keyb=valb:keyc=valc:keyd=vald:keybig=this is bigger
value:keyanother=this is another key value

And here is my code.  I've factored out the line processing so that it
would show up in the dprofpp.  Again, sorry if there are any hand-copy
errors ....

#!/usr/bin/perl

use strict; use warnings;
use IO::File; use Text::CSV_XS;

my @valid_columns = qw/ keya keyb keyc keyd keye keyf keyg keybig
keyanother /;
my %valid_columns = map {$_ => 1} @valid_columns;

my $output_csv = Text::CSV_XS->new({eol=>"\n", 'binary' => 1});
$output_csv->print(*STDOUT, process_line($_)) while (<>);

sub process_line {
  my ($line) = @_;
  my ($ip_range, $rest) = split /\s+/, $line, 2;
  chomp($rest);

  my %ip_details = (ip_range => $ip_range);

  # split on ':', then split each element on '=' and stick in hash
  map { my ($k, $v) = split /=/; $ip_details{$k} = $v } split(/:/,
$rest);

  # fix up column with random bad bytes
  $ip_details{keya} = s/[^\x20-\x7e]//g;

  my @cols = map { $ip_details{$_} } @valid_columns;
  return \@cols;
}

and the top of the dprofpp looks like:

%Time ExclSec CumulS #Calls sec/call Csec/c Name
 81.7   10.38 10.386 214000   0.0000 0.0000  main::process_line
 10.7   1.362  1.838 214000   0.0000 0.0000 Text::CSV_XS::print
 3.75   0.476  0.476 214000   0.0000 0.0000 IO::Handle::print
 ... other stuff is <1s

Greatly appreciate all your help.



------------------------------

Date: Fri, 27 Oct 2006 23:05:22 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: PPM is missing...?
Message-Id: <45420533$0$17351$afc38c87@news.optusnet.com.au>


"livefreeordie" <jpittman2@gmail.com> wrote in message
 .
 .
>
> Any ideas on why it didn't get installed or how I can get it?
>

I think you should raise this on ActiveState's ppm mailing to list. To do
that you'll need to first visit
http://listserv.activestate.com/mailman/mysubs and subscribe to the ppm
mailing list.

I don't know the answer to your question (obviously), but I would think that
there are people on that list who should be made aware of the problem (and
who can help with a solution). When you post there you should also specify
just which build of ActiveState perl you installed.

You could also file a bug report (start by visiting
http://bugs.activestate.com/help.cgi ) - but I'd try the mailing list before
doing that.

Cheers,
Rob




------------------------------

Date: Fri, 27 Oct 2006 10:06:49 -0700
From: "Mark" <nospam@thanksanyway.org>
Subject: Reducing file length in Perl?
Message-Id: <1161968809.702291@bubbleator.drizzle.com>

Hello.

I am processing a large text file, and I need to eliminate all data after a 
certain point in the file. Essentially I need to specify a new EOF, sort of 
an "anti-append"; the file saved on disk would become considerably smaller.

Is there a way to do this in Perl without writing the text that I want to 
keep to a new file?

Thanks
-Mark




------------------------------

Date: 27 Oct 2006 10:15:05 -0700
From: usenet@DavidFilmer.com
Subject: Re: Reducing file length in Perl?
Message-Id: <1161969304.963506.256140@b28g2000cwb.googlegroups.com>

Mark wrote:
> I am processing a large text file, and I need to eliminate all data after a
> certain point in the file.

   perldoc -f truncate

--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)



------------------------------

Date: Fri, 27 Oct 2006 15:39:45 +0100
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Store multi-dimensions array for use in latter form?
Message-Id: <g69k62lrff2.fsf@lifelogs.com>

On 27 Oct 2006, shareparadise@gmail.com wrote:

> This project I'm doing is an assignment which will be tested on the
> school server, and I know that server doesnt have session module
> installed. I dont know if the grader would be kind enough to install
> it for me, and I dont want to risk here.

You'll find very few people willing to help with homeworks here.

Ted


------------------------------

Date: 27 Oct 2006 07:47:35 -0700
From: "shareparadise@gmail.com" <shareparadise@gmail.com>
Subject: Re: Store multi-dimensions array for use in latter form?
Message-Id: <1161960455.605334.236940@i42g2000cwa.googlegroups.com>

This homework is not about passing the array between forms, Ted. It's a
XML processor, and Im not asking anyone to write that for me. Im stuck
at passing the array between form, and I ask for help with that, tell
me what's wrong with it then?
If you dont see if you can help then it's fine, you dont need to add
any uh-helpful comment like that!



------------------------------

Date: Fri, 27 Oct 2006 09:52:27 -0600
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: Store multi-dimensions array for use in latter form?
Message-Id: <WaCdnVpm4tKqtt_YnZ2dnUVZ_rqdnZ2d@comcast.com>

shareparadise@gmail.com wrote:

> This homework is not about passing the array between forms, Ted. It's a
> XML processor, and Im not asking anyone to write that for me.

No need. There are several good ones at CPAN.

> Im stuck
> at passing the array between form, and I ask for help with that, tell
> me what's wrong with it then?

You can't pass an AoA between forms. What you need to do is store the 
data contained in the AoA on the server, then pass an identifier to the 
form that will allow you to find the data later and re-build the AoA.

Take a look at the posting guidelines for this group, posted here twice 
a week, then write a short but complete program the attempts to pass an 
array of arrays between forms. Someone here will be able to comment on it.

> If you dont see if you can help then it's fine, you dont need to add
> any uh-helpful comment like that!

With that attitude, you shouldn't expect a lot of help here.


------------------------------

Date: 27 Oct 2006 17:34:16 GMT
From: xhoster@gmail.com
Subject: Re: Store multi-dimensions array for use in latter form?
Message-Id: <20061027133516.446$gR@newsreader.com>

"shareparadise@gmail.com" <shareparadise@gmail.com> wrote:
> This project I'm doing is an assignment which will be tested on the
> school server, and I know that server doesnt have session module
> installed. I dont know if the grader would be kind enough to install it
> for me, and I dont want to risk here.
>
> This is how I tried to do it with cookie:
>
> my $query = new CGI;
>
> my $cookie = $query->cookie( -name     => 'table',
>                                      -value    => @table,
>                           # tried $table and \@table as well
>                                      -expires  => '+1M',
>                                      -path     => '/'
>                                     );
> print
> $query->header(-cookie=>$cookie),$query->start_html(-title=>"Testing2");
> # .....
>
> # Then tried to retrieve it using this:
> my @table = $query->cookie(-name=>'table');
>
> Actually I tried with 1 dim array and it worked well, I dont know what
> goes wrong here?

When you tried to use the multidim table, what actually happened?

Which one worked well with the 1 dim array, the @table, the \@table, or the
$table?

> This is my first hand experience with Perl so Im still
> kinda confused.

CGI's cookie features doesn't inherently handle multidimensional cookies.
As far as I know, there is no magic incantation (or module) to make it
handle them.  You need to write something yourself to join and escape the
data down to either a single dimension or a single string.  Generally the
way to do this is obvious based on the structure of your data (i.e. if your
data is numbers with no "weird" characters, just join them on tabs for one
layer and newlines for the other, etc.), or if you got the multidim data
by parsing a string in the first place, store the string itself and
reparse.

If you wanted something more general, you could always dig into the guts of
CGI to use it's internal methods, like CGI::Util::escape() and unescape().


Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


------------------------------

Date: 27 Oct 2006 10:20:48 -0700
From: "crez" <clement.rezvoy@gmail.com>
Subject: System::DProf and system()
Message-Id: <1161969648.662745.234270@e3g2000cwe.googlegroups.com>

hello,

I am curently processing profiling data from a script that contains
calls to external program via system(). I would need to know wether the
timing info reported by DProf also includes the running time of these
external programs or not.

thanks

Cl=E9ment.



------------------------------

Date: 27 Oct 2006 17:59:05 GMT
From: xhoster@gmail.com
Subject: Re: System::DProf and system()
Message-Id: <20061027140005.646$3d@newsreader.com>

"crez" <clement.rezvoy@gmail.com> wrote:
> hello,
>
> I am curently processing profiling data from a script that contains
> calls to external program via system(). I would need to know wether the
> timing info reported by DProf also includes the running time of these
> external programs or not.

That depends on whether you give the -r option to dprofpp.

Anyway, you can try it out with a few simple scripts.

perl -d:DProf -e 'sub foo{perl spin.pl}}; \
                  sub bar {foreach my $x (1..1e8) {}}; foo(); bar()'

(Where spin.pl is just a file with "foreach my $x (1..1e8) {}")


Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 9898
***************************************


home help back first fref pref prev next nref lref last post