[26622] in Perl-Users-Digest
Perl-Users Digest, Issue: 8732 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 5 14:05:30 2005
Date: Mon, 5 Dec 2005 11:05:08 -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 Mon, 5 Dec 2005 Volume: 10 Number: 8732
Today's topics:
Re: A question of hashes in a module. <jgibson@mail.arc.nasa.gov>
Howto get return code from a extern program? <luoyong_zh@hotmail.com>
Re: Howto get return code from a extern program? <sherm@dot-app.org>
Re: Howto get return code from a extern program? <luoyong_zh@hotmail.com>
Re: Howto get return code from a extern program? <rvtol+news@isolution.nl>
Re: IO::Socket help xhoster@gmail.com
Re: TCP IO::Socket::INET Listen w/o using ->accept? (1 xhoster@gmail.com
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 05 Dec 2005 10:30:39 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: A question of hashes in a module.
Message-Id: <051220051030395872%jgibson@mail.arc.nasa.gov>
In article <Xns9720E62FD6FD8castleamber@130.133.1.4>, John Bokma
<john@castleamber.com> wrote:
> > And in the debugger looking at %self
> > gives just a hash id, but $self gives the whole hash value tree. In
> > an ordinary MAIN program, %hash gives the whole value tree and $hash
> > just gives the values for that one key.
>
> my $hash = ( foo => bar );
Don't you mean 'my %hash = ( foo => bar );' here?
> my $ref = \%hash;
>
> print "$hash{ foo }\n";
> print "$ref->{ foo }\n";
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
------------------------------
Date: Mon, 05 Dec 2005 19:57:38 +0800
From: yong <luoyong_zh@hotmail.com>
Subject: Howto get return code from a extern program?
Message-Id: <dn19uu$7bh$1@news.yaako.com>
Hello all
I lauch a program with system(),but the function returns only the
outpout.how can I get the value of the program return to shell?
Thanks.
------------------------------
Date: Mon, 05 Dec 2005 07:14:10 -0500
From: Sherm Pendley <sherm@dot-app.org>
Subject: Re: Howto get return code from a extern program?
Message-Id: <m264q3zqp9.fsf@Sherm-Pendleys-Computer.local>
yong <luoyong_zh@hotmail.com> writes:
> I lauch a program with system(),but the function returns only the
> outpout.how can I get the value of the program return to shell?
Please read the documentation for the function you're referring to:
perldoc -f system
The system() function does *not* return the output of the launched
program, and it *does* get the return value.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Mon, 05 Dec 2005 20:32:27 +0800
From: yong <luoyong_zh@hotmail.com>
Subject: Re: Howto get return code from a extern program?
Message-Id: <dn1c05$9ld$1@news.yaako.com>
Thanks :)
Sherm Pendley wrote:
> yong <luoyong_zh@hotmail.com> writes:
>
> Please read the documentation for the function you're referring to:
>
> perldoc -f system
>
> The system() function does *not* return the output of the launched
> program, and it *does* get the return value.
>
> sherm--
------------------------------
Date: Mon, 5 Dec 2005 13:19:03 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Howto get return code from a extern program?
Message-Id: <dn1fhq.14o.1@news.isolution.nl>
yong schreef:
> I lauch a program with system(),but the function returns only the
> outpout.how can I get the value of the program return to shell?
Always read `perldoc -f system` first.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: 05 Dec 2005 17:41:02 GMT
From: xhoster@gmail.com
Subject: Re: IO::Socket help
Message-Id: <20051205124102.628$Zq@newsreader.com>
Vespasian <ves@ves.net> wrote:
top posting fixed. Please don't top post.
>
> On Sat, 03 Dec 2005 23:43:26 GMT, "A. Sinan Unur"
> <1usa@llenroc.ude.invalid> wrote:
>
> >xhoster@gmail.com wrote in news:20051203182752.639$HH@newsreader.com:
> >
> >> I'm guessing that the reason that it dies at the die statement would
> >> have be reflected in the contents of $! at the die statement. Why
> >> have you concealed this from us?
> >
> >Take this with a grain of salt, but, IIRC correctly, $@ tends to be more
> >informative in IO::Socket related errors.
> >
> Error reported: unknown error
Is that the value of "$!" or of "$@"? Whichever it is, try the other
one to see if it more informative.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 05 Dec 2005 18:11:01 GMT
From: xhoster@gmail.com
Subject: Re: TCP IO::Socket::INET Listen w/o using ->accept? (1 to 1)
Message-Id: <20051205131101.137$We@newsreader.com>
"Eckstein C." <casabianca@suplitein.junk.de.net.org.com> wrote:
> I want to know if it's possible to have a listening TCP socket (I'm
> using IO::Socket::INET), that only expects one client, to instead of
> using
>
> my $client = $listen_sock->accept();
>
> and
>
> $client->recv($data, 1024);
>
> as you would normally do, and instead, just do a
>
> $listen_sock->recv($data, 1024)
$listen_sock->accept()->recv($data,1024);
> on the listening socket?
>
> This works for UDP (I know I know, UDP is connectionless) and I've bene
> able to do things this way in other langs before, that let you either go
> the "accept/client" route or "read from socket", 1:1 listen setup.
>
> So basically I just want a simple 1:1 setup.
If those extra 10 characters are too offensive to you, it should be fairly
easy to define your own module which hides them behind a method call.
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 8732
***************************************