[30430] in Perl-Users-Digest
Perl-Users Digest, Issue: 1673 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 25 16:10:17 2008
Date: Wed, 25 Jun 2008 13:09:14 -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 Wed, 25 Jun 2008 Volume: 11 Number: 1673
Today's topics:
Re: Difference of * and + in regular expression <MSwanberg@gmail.com>
new CPAN modules on Wed Jun 25 2008 (Randal Schwartz)
Re: number to word in any language (Ben Bullock)
Re: Question on learning Perl <spamtrap@dot-app.org>
Re: run application from perl nonblocking? <nielsen.sebastian@gmail.com>
Re: run application from perl nonblocking? <jurgenex@hotmail.com>
Re: run application from perl nonblocking? <nielsen.sebastian@gmail.com>
Re: run application from perl nonblocking? <RedGrittyBrick@SpamWeary.foo>
Re: run application from perl nonblocking? <glennj@ncf.ca>
Re: run application from perl nonblocking? xhoster@gmail.com
Re: run application from perl nonblocking? <jurgenex@hotmail.com>
Re: run application from perl nonblocking? <MSwanberg@gmail.com>
Where's my STDOUT? <fatted@gmail.com>
Re: Where's my STDOUT? xhoster@gmail.com
Re: Where's my STDOUT? <fawaka@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 25 Jun 2008 12:49:31 -0700 (PDT)
From: MSwanberg <MSwanberg@gmail.com>
Subject: Re: Difference of * and + in regular expression
Message-Id: <297134f9-5f0c-4fc0-a789-eb74eebafe74@s50g2000hsb.googlegroups.com>
On Jun 21, 9:04=A0pm, Peng Yu <PengYu...@gmail.com> wrote:
> Hi,
>
> If I used the uncommented if-statement, I would get no match. If I
> used the commend if statement otherwise, I would have the following
> string as the output. I'm wondering why the regular expression with *
> does not match anything?
>
> =A0namespace a { namespace b { namespace c {
>
> Thanks,
> Peng
>
> $string=3D"a namespace a { namespace b { namespace c { ";
>
> #if ($string =3D~ /\s*((namespace\s+\w(\w|\d)*\s*\{\s*)+)/) {
> if ($string =3D~ /\s*((namespace\s+\w(\w|\d)*\s*\{\s*)*)/) {
> =A0 print "$1\$\n";
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -
I changed it to
if ($string =3D~ /\s*(namespace\s+\w(\w|\d)*\s*\{\s*)/) {
print "$1\$\n";
}
and it seems to work okay.
What exactly are you trying to do?
-Mike
------------------------------
Date: Wed, 25 Jun 2008 04:42:20 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Jun 25 2008
Message-Id: <K3052K.1Hto@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Acme-PerlVMGolf-0.02
http://search.cpan.org/~tokuhirom/Acme-PerlVMGolf-0.02/
perl5 vm golf
----
Authen-CAS-Client-0.03
http://search.cpan.org/~pravus/Authen-CAS-Client-0.03/
Provides an easy-to-use interface for authentication using JA-SIG's Central Authentication Service
----
CEDict-Pinyin-0.01000
http://search.cpan.org/~davaz/CEDict-Pinyin-0.01000/
Validates pinyin strings
----
CEDict-Pinyin-0.01001
http://search.cpan.org/~davaz/CEDict-Pinyin-0.01001/
Validates pinyin strings
----
CPAN-Testers-ParseReport-0.0.3
http://search.cpan.org/~andk/CPAN-Testers-ParseReport-0.0.3/
parse reports to cpantesters.perl.org from various sources
----
CPAN-Testers-ParseReport-0.0.4
http://search.cpan.org/~andk/CPAN-Testers-ParseReport-0.0.4/
parse reports to cpantesters.perl.org from various sources
----
Catalyst-Plugin-ConfigComponents-0.1.33
http://search.cpan.org/~pjfl/Catalyst-Plugin-ConfigComponents-0.1.33/
Creates components from config entries
----
Catalyst-Plugin-InflateMore-0.1.20
http://search.cpan.org/~pjfl/Catalyst-Plugin-InflateMore-0.1.20/
Inflates symbols in application config
----
Catalyst-Plugin-SmartURI-0.022
http://search.cpan.org/~rkitover/Catalyst-Plugin-SmartURI-0.022/
Configurable URIs for Catalyst
----
Class-Light-0.0100
http://search.cpan.org/~davaz/Class-Light-0.0100/
Provides cascading object initialization and autovivified accessors and mutators
----
Config-Merged-0.00
http://search.cpan.org/~pravus/Config-Merged-0.00/
Load and merge configuration from different file formats, transparently.
----
Config-Merged-0.01
http://search.cpan.org/~pravus/Config-Merged-0.01/
Load and merge configuration from different file formats, transparently.
----
DBIx-Class-DynamicSubclass-0.03
http://search.cpan.org/~syber/DBIx-Class-DynamicSubclass-0.03/
Convenient way to use dynamic subclassing.
----
DBIx-Class-FrozenColumns-0.05
http://search.cpan.org/~syber/DBIx-Class-FrozenColumns-0.05/
Store virtual columns inside another column.
----
DBIx-Perlish-0.41
http://search.cpan.org/~gruber/DBIx-Perlish-0.41/
a perlish interface to SQL databases
----
DBIx-RetryOverDisconnects-0.03
http://search.cpan.org/~syber/DBIx-RetryOverDisconnects-0.03/
DBI wrapper that helps to deal with databases connection problems
----
Data-CloudWeights-0.2.58
http://search.cpan.org/~pjfl/Data-CloudWeights-0.2.58/
Calculate values for an HTML tag cloud
----
Data-Validation-0.1.30
http://search.cpan.org/~pjfl/Data-Validation-0.1.30/
Check data values form conformance with constraints
----
Gtk2-Ex-Xor-1
http://search.cpan.org/~kryde/Gtk2-Ex-Xor-1/
----
HTML-Accessors-0.1.31
http://search.cpan.org/~pjfl/HTML-Accessors-0.1.31/
Generate HTML elements
----
HTML-WikiConverter-XWiki-0.02
http://search.cpan.org/~packi/HTML-WikiConverter-XWiki-0.02/
Convert HTML to XWiki markup
----
IPC-SRLock-0.1.64
http://search.cpan.org/~pjfl/IPC-SRLock-0.1.64/
Set/reset locking semantics to single thread processes
----
Image-Size-FillFullSelect-0.0.1
http://search.cpan.org/~vvelox/Image-Size-FillFullSelect-0.0.1/
Choose wether a image fill setting for a image should be fill or full.
----
Log-Dispatch-FileRotate-1.17
http://search.cpan.org/~markpf/Log-Dispatch-FileRotate-1.17/
Log to files that archive/rotate themselves
----
Net-FriendFeed-0.85
http://search.cpan.org/~kappa/Net-FriendFeed-0.85/
Perl interface to FriendFeed.com API
----
Net-SFTP-Foreign-1.40
http://search.cpan.org/~salva/Net-SFTP-Foreign-1.40/
SSH File Transfer Protocol client
----
Object-InsideOut-3.43
http://search.cpan.org/~jdhedden/Object-InsideOut-3.43/
Comprehensive inside-out object support module
----
POE-Component-Client-FTP-0.20
http://search.cpan.org/~bingos/POE-Component-Client-FTP-0.20/
Implements an FTP client POE Component
----
POE-Component-IRC-Service-0.994
http://search.cpan.org/~bingos/POE-Component-IRC-Service-0.994/
a fully event driven IRC Services module
----
POE-Component-Server-BigBrother-0.01
http://search.cpan.org/~yblusseau/POE-Component-Server-BigBrother-0.01/
a POE Component that implements BigBrother daemon functionality
----
POE-Component-SmokeBox-Uploads-NNTP-0.06
http://search.cpan.org/~bingos/POE-Component-SmokeBox-Uploads-NNTP-0.06/
Obtain uploaded CPAN modules via NNTP.
----
POE-Component-SmokeBox-Uploads-RSS-0.04
http://search.cpan.org/~bingos/POE-Component-SmokeBox-Uploads-RSS-0.04/
Obtain uploaded CPAN modules via RSS.
----
POE-Filter-BigBrother-0.11
http://search.cpan.org/~yblusseau/POE-Filter-BigBrother-0.11/
protocol abstractions for BigBrother streams
----
POE-Filter-CSV-1.14
http://search.cpan.org/~bingos/POE-Filter-CSV-1.14/
A POE-based parser for CSV based files.
----
POE-Filter-CSV_XS-1.12
http://search.cpan.org/~bingos/POE-Filter-CSV_XS-1.12/
A POE-based parser for CSV based files.
----
POE-Filter-ParseWords-1.04
http://search.cpan.org/~bingos/POE-Filter-ParseWords-1.04/
A POE-based parser to parse text into an array of tokens.
----
POE-Wheel-Run-Win32-0.08
http://search.cpan.org/~bingos/POE-Wheel-Run-Win32-0.08/
event driven fork/exec with added value
----
Perl-Critic-Pulp-1
http://search.cpan.org/~kryde/Perl-Critic-Pulp-1/
----
Queue-Q4M-0.00004
http://search.cpan.org/~dmaki/Queue-Q4M-0.00004/
Simple Interface To q4m
----
Rose-DBx-Object-Renderer-0.13
http://search.cpan.org/~danny/Rose-DBx-Object-Renderer-0.13/
Web UI Rendering for Rose::DB::Object
----
Set-IntSpan-Fast-1.12
http://search.cpan.org/~andya/Set-IntSpan-Fast-1.12/
Fast handling of sets containing integer spans.
----
Statistics-ANOVA-0.03
http://search.cpan.org/~rgarton/Statistics-ANOVA-0.03/
Perform oneway analyses of variance
----
Sys-Info-0.52_7
http://search.cpan.org/~burak/Sys-Info-0.52_7/
Fetch information from the host system
----
TAP-Formatter-HTML-0.04
http://search.cpan.org/~spurkis/TAP-Formatter-HTML-0.04/
TAP Test Harness output delegate for html output
----
TermReadKey-2.30.01
http://search.cpan.org/~stsi/TermReadKey-2.30.01/
----
Tie-Array-Packed-0.09
http://search.cpan.org/~salva/Tie-Array-Packed-0.09/
store arrays in memory efficiently as packed strings
----
WWW-MobileCarrierJP-0.17
http://search.cpan.org/~tokuhirom/WWW-MobileCarrierJP-0.17/
scrape mobile carrier information
----
XUL-App-0.06
http://search.cpan.org/~agent/XUL-App-0.06/
Nifty XUL apps in a XUL::App
----
Xen-Control-0.02
http://search.cpan.org/~jkutej/Xen-Control-0.02/
control and fetch information about xen domains
----
ZConf-0.2.0
http://search.cpan.org/~vvelox/ZConf-0.2.0/
A configuration system allowing for either file or LDAP backed storage.
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
------------------------------
Date: Wed, 25 Jun 2008 06:35:32 +0000 (UTC)
From: benkasminbullock@gmail.com (Ben Bullock)
Subject: Re: number to word in any language
Message-Id: <g3sovk$c35$1@cgi-ml.accsnet.ne.jp>
Ted Zlatanov <tzz@lifelogs.com> wrote:
> The Lingua::*::Numbers
> modules are not setting the output encoding; it seems like that's up to
> the application.
Quibble: there is no "the" output encoding in Perl. It's possible to
set an output encoding for each stream (e.g. open a file and set its
output as UTF-8, and set STDOUT as something else, and print the same
string to both, and have it come out in the correct encoding), so
unless the modules actually write output (which I doubt) it doesn't
make sense for them to set an output encoding.
If you mean the encoding of the strings themselves, that should be
done in Perl's internal encoding. I know Lingua::JA::Numbers does that
(the author is actually the maintainer of Encode.pm, so we'd expect
that much from him), but I have no idea about the rest of them.
------------------------------
Date: Wed, 25 Jun 2008 13:17:05 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Question on learning Perl
Message-Id: <m1skv1cu3y.fsf@dot-app.org>
grocery_stocker <cdalten@gmail.com> writes:
> I asked this in another forum and never got a response. Maybe the
> question was worded poorly.
>
> Anyhow, when you learned Perl, did you memorize most of the functions?
> Ie memorize what they do and the arguments that they take? Or did you
> just memorize the ones that you felt were relevant to you job? Is
> there some kind of trick to memorizing the functions?
The "trick" is to not do that. :-) I stopped trying to memorize language
details like that a long time ago - about the time I was learning my third
or fourth programming language.
Instead, I learn concepts and ideas. For functions that I use frequently,
the memorization takes care of itself eventually. For others, there's perldoc,
or a book with an animal on the cover.
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Wed, 25 Jun 2008 02:57:03 -0700 (PDT)
From: sebastian nielsen <nielsen.sebastian@gmail.com>
Subject: Re: run application from perl nonblocking?
Message-Id: <74ad04d4-e5f9-41ef-86f6-96e124734c1a@f63g2000hsf.googlegroups.com>
I checked it, but system("command &") is a linux-specific command.
Some other guy pointed me to Win32::Process, but the question is if
any process lanuched through Win32::Process survives when the perl
script exits.
------------------------------
Date: Wed, 25 Jun 2008 11:28:15 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: run application from perl nonblocking?
Message-Id: <ufa464551jku24t2fhsda73l4bif1akvtf@4ax.com>
sebastian nielsen <nielsen.sebastian@gmail.com> wrote:
>I checked it,
What is "it"? Please quote enough context such that your reply is
understandable on its own.
>but system("command &") is a linux-specific command.
Actually it is a shell-specific command. Let me guess: you are trying to
run a command in the background.
>Some other guy pointed me to Win32::Process,
Let me guess again: you are trying to start a process in the background
on Windows.
Why don't you use the standard Windows method:
system("start command");
jue
------------------------------
Date: Wed, 25 Jun 2008 08:30:54 -0700 (PDT)
From: sebastian nielsen <nielsen.sebastian@gmail.com>
Subject: Re: run application from perl nonblocking?
Message-Id: <3f1e111e-98e6-4bfc-9cfa-a51497765c25@y38g2000hsy.googlegroups.com>
since when running:
system("command");
The perl script will sit there and wait until the started "command"
has finished.
So if "command" takes 1 hour to execute, then the system("command");
in perl will take 1 hour to complete before perl continues too.
What I want to do is to start the "command", release control from the
"command" and then continue running the perl script WHILE "command" is
running.
And "command" should NOT die when the perl script is complete.
------------------------------
Date: Wed, 25 Jun 2008 16:39:23 +0100
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: run application from perl nonblocking?
Message-Id: <486266ad$0$26082$db0fefd9@news.zen.co.uk>
sebastian nielsen wrote:
Omitted context reinstated - please use a more conventional posting style.
Jürgen Exner wrote
>> Let me guess again: you are trying to start a process in the background
>> on Windows.
>>
>> Why don't you use the standard Windows method:
>> system("start command");
>
> since when running:
>
> system("command");
>
> The perl script will sit there and wait until the started "command"
> has finished.
> So if "command" takes 1 hour to execute, then the system("command");
> in perl will take 1 hour to complete before perl continues too.
>
> What I want to do is to start the "command", release control from the
> "command" and then continue running the perl script WHILE "command" is
> running.
>
> And "command" should NOT die when the perl script is complete.
>
You haven't tried what Jürgen suggested!
C:\>perl -e "system('start notepad'); print 'Bye'"
Bye
(After perl exits, Notepad stays on screen and does not die).
--
RGB
------------------------------
Date: 25 Jun 2008 15:49:07 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: run application from perl nonblocking?
Message-Id: <slrng64q7k.43k.glennj@smeagol.ncf.ca>
At 2008-06-25 11:30AM, "sebastian nielsen" wrote:
>At 2008-06-25 07:28AM, "Jürgen Exner" wrote:
>> Let me guess again: you are trying to start a process in the background
>> on Windows.
>>
>> Why don't you use the standard Windows method:
>> system("start command");
>
> since when running:
>
> system("command");
>
> The perl script will sit there and wait until the started "command"
> has finished.
> So if "command" takes 1 hour to execute, then the system("command");
> in perl will take 1 hour to complete before perl continues too.
>
> What I want to do is to start the "command", release control from the
> "command" and then continue running the perl script WHILE "command" is
> running.
>
> And "command" should NOT die when the perl script is complete.
Did you even try Jürgen's advice?
This launches Excel, which stays open after perl exits:
C:\Perl\bin>perl -e "system qq{start $ENV{HOME}/spreadsheet.xls}"
--
Glenn Jackman
Write a wise saying and your name will live forever. -- Anonymous
------------------------------
Date: 25 Jun 2008 15:58:30 GMT
From: xhoster@gmail.com
Subject: Re: run application from perl nonblocking?
Message-Id: <20080625115832.203$Dw@newsreader.com>
sebastian nielsen <nielsen.sebastian@gmail.com> wrote:
> since when running:
>
> system("command");
That isn't what he suggested you do.
It seems like you are unwilling to uote the material you are allegedly
replying to, nor even bother to read that material.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Wed, 25 Jun 2008 16:17:54 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: run application from perl nonblocking?
Message-Id: <crr464h13raep8a270huc58iij4m3dn9mv@4ax.com>
sebastian nielsen <nielsen.sebastian@gmail.com> wrote:
>system("command");
>
>What I want to do is to start the "command", release control from the
>"command" and then continue running the perl script WHILE "command" is
>running.
Then start 'command' in the background. How to do that depends on your
OS and/or command shell.
jue
------------------------------
Date: Wed, 25 Jun 2008 12:34:18 -0700 (PDT)
From: MSwanberg <MSwanberg@gmail.com>
Subject: Re: run application from perl nonblocking?
Message-Id: <5774c265-13ec-4deb-bd43-ee12eb370c7d@l42g2000hsc.googlegroups.com>
On Jun 25, 10:30=A0am, sebastian nielsen <nielsen.sebast...@gmail.com>
wrote:
> since when running:
>
> system("command");
>
> The perl script will sit there and wait until the started "command"
> has finished.
> So if "command" takes 1 hour to execute, then the system("command");
> in perl will take 1 hour to complete before perl continues too.
>
> What I want to do is to start the "command", release control from the
> "command" and then continue running the perl script WHILE "command" is
> running.
>
> And "command" should NOT die when the perl script is complete.
Adding "start" to your command string should do the trick... go to a
command interpreter (DOS box) and type "help start" to get more info.
If you just don't want to do it that way, try forking the perl script
and executing the command from the child fork.
-Mike
------------------------------
Date: Wed, 25 Jun 2008 06:30:06 -0700 (PDT)
From: Fatted Shmatted <fatted@gmail.com>
Subject: Where's my STDOUT?
Message-Id: <19f7668b-7904-46de-91e5-d04899cf910e@k13g2000hse.googlegroups.com>
I'm writing a bidirectional client ( simplified version below),
messages to a server and replies from a server, however the client
doesn't need to wait for replies before sending further messages.
I can't get the child process to write to STDOUT (see code below).
STDOUT is:
[Connected to 127.0.0.1:2999]
TX'ed
done
If I change the while loop in the child loop to be:
while(1) instead of while(<$handle>)
I do get output on STDOUT but this stops me from receiving a SIG{CHLD}
(naturally child loop never exits).
STDOUT is:
[Connected to 127.0.0.1:2999]
TX'ed
RX'ed g
RX'ed o
RX'ed o
RX'ed d
RX'ed b
RX'ed y
RX'ed e
RX'ed
I've also tried a select on STDOUT in the child loop :
if(sysread($handle,$rxd,1,0))
{
my $old_fh = select(STDOUT);
$| = 1;
print "RX'ed ".$rxd."\n";
select($old_fh);
}
but no change...
Any idea's?
--
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
use IO::Socket;
my $host = "127.0.0.1";
my $port = "2999";
my $handle = IO::Socket::INET->new(Proto => "tcp", PeerAddr => $host,
PeerPort => $port) or die "can't connect to port $port on $host: $!";
$handle->autoflush(1);
print STDERR "[Connected to $host:$port]\n";
my $child_pid = "";
die "can't fork: $!" unless defined($child_pid = fork());
if ($child_pid)
{
$SIG{CHLD} = sub{ print "done\n"; exit(0) };
print $handle "hello";
print "TX'ed\n";
$handle->shutdown(1);
sleep;
}
else
{
my $rxd = "";
while(<$handle>)
{
if(sysread($handle,$rxd,1,0))
{
print "RX'ed ".$rxd."\n";
}
}
}
***
server for this test could be:
$ netcat -l -p 2999 < out.put > in.put
Where out.put contains the word goodbye
***
------------------------------
Date: 25 Jun 2008 14:15:11 GMT
From: xhoster@gmail.com
Subject: Re: Where's my STDOUT?
Message-Id: <20080625101512.156$rG@newsreader.com>
Fatted Shmatted <fatted@gmail.com> wrote:
> while(<$handle>)
This reads a line into $_, which is then ignored.
> {
> if(sysread($handle,$rxd,1,0))
Since you already read the data with <>, there is probably nothing to
sysread at that point.
You could use something like:
while(sysread($handle,$rxd,1,0)) {
print "RX'ed ".$rxd."\n";
}
But that doesn't distinguish between eof and errors on the handle.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Wed, 25 Jun 2008 19:27:17 +0200
From: Leon Timmermans <fawaka@gmail.com>
Subject: Re: Where's my STDOUT?
Message-Id: <1ea7e$48627ff5$89e0e08f$20350@news1.tudelft.nl>
On Wed, 25 Jun 2008 14:15:11 +0000, xhoster wrote:
> Fatted Shmatted <fatted@gmail.com> wrote:
>
>> while(<$handle>)
>
> This reads a line into $_, which is then ignored.
>
>> {
>> if(sysread($handle,$rxd,1,0))
>
> Since you already read the data with <>, there is probably nothing to
> sysread at that point.
>
> You could use something like:
>
> while(sysread($handle,$rxd,1,0)) {
> print "RX'ed ".$rxd."\n";
> }
>
> But that doesn't distinguish between eof and errors on the handle.
>
> Xho
My question to the OP: why the hell do you use sysread instead of plain
old read? You're not making your life easier that way (you could
alternatively use IO::Handle's methods too).
Anyway: I think this does what you want.
while(!eof($handle)) {
if (read($handle,$rxd,1,0)) {
print "RX'ed ".$rxd."\n";
}
}
Alternatively, you could just check sysread/read's return value. It's
undefined on error, 0 on eof. TIMTOWTDI.
Cheers,
Leon Timmermans
------------------------------
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 V11 Issue 1673
***************************************