[26739] in Perl-Users-Digest
Perl-Users Digest, Issue: 8824 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 4 11:05:29 2006
Date: Wed, 4 Jan 2006 08:05:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 4 Jan 2006 Volume: 10 Number: 8824
Today's topics:
Re: calling subroutine <madhuram@nortel.com>
IO::Pipe and loss of data <none@here.com>
output of system() call <madhuram@nortel.com>
Re: output of system() call <joe@inwap.com>
Re: port 80 chris-usenet@roaima.co.uk
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 4 Jan 2006 10:41:27 -0500
From: "Madhu Ramachandran" <madhuram@nortel.com>
Subject: Re: calling subroutine
Message-Id: <dpgqba$97$1@zcars129.ca.nortel.com>
did stupid mistake.. typo in calling place.
sorry for wasting all your times.
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrndrmbq0.2tg.tadmc@magna.augustmail.com...
> Madhu Ramachandran <madhuram@nortel.com> wrote:
>
>
>> unshift(@INC, "./scripts);
> ^
> ^ where's the other quote?
>
>
>> I get error when i run
>> #perl main.pl
>> Undefined subroutine &main::mysub called at scripts/doThis.pl line 4,
>
>
> Funny, I get a different message when I run your program.
>
>
>> would appreciate any help.
>
>
> Would appreciate if you posted Real Perl Code.
>
>
> --
> Tad McClellan SGML consulting
> tadmc@augustmail.com Perl programming
> Fort Worth, Texas
------------------------------
Date: Wed, 4 Jan 2006 14:38:02 +0100
From: "Genevieve S." <none@here.com>
Subject: IO::Pipe and loss of data
Message-Id: <dpgj3q$7u3$1@news.sap-ag.de>
Hello,
I use the module IO::Pipe to have many process-childen communicate to their
father. As they are all sending the same kind of information (and the father
has not the time to listen to a pipe for each of the processes), only one
pipe-object is used for it. Everything seemed to be ok, but then I noticed a
loss of data - a small one but at least a loss. Then I decided to use a
message id to check if the loss was within the pipe or my code. To have it
in numbers: I have 71 child-processes which were sending between 400 and
400,000 messages to the father. That father found 6 cases, where between 2
and 10 message seemed to got lost when sent through the pipe.
The module-description does not help me with that: Is it not good to have so
many writing ends on a single IO::Pipe or did I just reach the limit for
memory (on scriptstart the amount of data grows very fast as the children
work on old log files, but after a time the father has worked off and gets
faster than they give more information so the information in the pipe at
once gets smaller again). I am just too new to perl to have a look to the
module and see what my problem is. Is there an easy way to find that out? Or
does anyone already know what might help in this information?
I don't think pasting code here helps, as it would be chopped and not very
helpful anymore. If anyone thinks this might help to understand my problem,
I will do it anyway :)
Thanks a lot for at least reading so far and thanks for all advises!
------------------------------
Date: Wed, 4 Jan 2006 10:45:42 -0500
From: "Madhu Ramachandran" <madhuram@nortel.com>
Subject: output of system() call
Message-Id: <dpgqj6$1h1$1@zcars129.ca.nortel.com>
question.
i am perl newbie. i read that system() call can be used to invoke other
program (shell scripts etc). The return code of the program is returned by
system() call and i have to >> by 8 bits.
is there any variable which will contain ouput printed by the program in
system() call?
eg:
system("mytest.sh");
if mytest.sh has echo "bla" in it. how can i capture the 'bla' value, using
the system() call?
currently iam doing this.
system ("mytest.sh > /tmp/outfile");
# I open this /tmp/outfile and use $line = <outFp>; and get the value.
wondering if there is an easier way to get output.
-Madhu
------------------------------
Date: Wed, 04 Jan 2006 08:02:29 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: output of system() call
Message-Id: <3YKdnf41W_MGbCbenZ2dnUVZ_s6dnZ2d@comcast.com>
Madhu Ramachandran wrote:
> i am perl newbie. i read that system() call can be used to invoke other
> program (shell scripts etc)
Where did you read about the system() call? If it was part of any
sort of decent tutorial, it should have told you right there the answer
to your question.
http://perldoc.perl.org/perlfaq8.html
------------------------------
Date: Wed, 4 Jan 2006 09:22:09 +0000
From: chris-usenet@roaima.co.uk
Subject: Re: port 80
Message-Id: <1ngs83-075.ln1@news.roaima.co.uk>
monkeys paw <steve@statenet.com> wrote:
> Is there a quick perl hack to dump all internet traffic to
> a flat file? i.e. monitor internet usage
This could work on my system (linux based):
system '/usr/sbin/tcpdump -i any -w /var/tmp/alltraffic.dat';
Well you did ask for a hack ;-)
Chris
------------------------------
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 8824
***************************************