[11058] in Perl-Users-Digest
Perl-Users Digest, Issue: 4658 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 15 10:03:42 1999
Date: Fri, 15 Jan 99 07:00:28 -0800
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, 15 Jan 1999 Volume: 8 Number: 4658
Today's topics:
about the path running <leech6@ie.cuhk.edu.hk>
Error testing the C::scan module before installation <michael.preminger@jbi.hioslo.no>
Finding the last URL that was accessed vulcan_savik@my-dejanews.com
Re: Finding the last URL that was accessed <webmaster@link-maker.com>
Re: Finding the last URL that was accessed <fty@utk.edu>
Fork me! need children <webmaster@link-maker.com>
Re: FORM to two different CGI? <webmaster@link-maker.com>
Free CGI (and Perl) enabled Web-hosting/provider nortinor@norikomail.com
glob error <not@giving.it.out>
how can I subscribe for this group? <y@mail.ru>
How to get IP address of a local machine under NT <IProskuriakov@mfkren.com>
Re: inclue text file in cgi output <webmaster@link-maker.com>
Re: kwlii: Formatting numbers in Perl ? <ebohlman@netcom.com>
kwlii: Formatting Numbers <kwlii@worldnet.att.net>
Re: Looking for Perl programmer in NYC area dave@mag-sol.com
Looking for RCP/RSH Client written in Perl <sivag@cisco.com>
Re: Losing linefeeds when encrypting email <conmara@tcon.net>
Re: Perl Criticism droby@copyright.com
Regex challenge (Eric Smith)
Re: Search engine help <webmaster@link-maker.com>
Re: Searching a string, with a headache, example (Giga Tron)
Searching a string, with a headache (Giga Tron)
Re: Searching a string, with a headache (Koos Pol)
Re: Searching a string, with a headache <webmaster@link-maker.com>
Set current position in a file (Giga Tron)
Re: Set current position in a file (Fluffy)
Re: Socket in Perl - help?????? <wtsai@ms.chttl.com.tw>
Re: sockets: server-side problem (robert)
Stopping <ctrl>-c during perl Scripts (win32) <sheridan@cableregina.com>
troubles with "exec prog ...>>file1..." <Christine.Pourcelot@inria.fr>
Re: Using a Form in HTML and a Perl Script. <jtb@bekkers.com.au>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 15 Jan 1999 21:08:17 +0800
From: HING <leech6@ie.cuhk.edu.hk>
Subject: about the path running
Message-Id: <Pine.SOL.3.95.990115205950.1179A-100000@iesun60>
hi,
i have a problem found for a cgi program link with c program in unix
machine by running in netscape, the problem may be properly due to the
invalid path of c/cgi program.
suppose i put the cgi called cgi.pl and c file called cprog put in a
directory called XXX, and the path of perl is YYY.
i want to know is that if i want to link with the c in the cgi.pl, if
i only use cprog, then the perl interpreter will think the cprog is in the
YYY, am i right?? So i need to give a complete path of the c program say
XXX\cprog in the cgi.pl, right??
other question is similar, if i success to call the cprog, and the
cprog need to open file in the same directory XXX. does the cprog need to
give the full path of those files instead of give the relative path??
Maybe my major question is that if i use the netscape to run the cgi
program. The current path is the cgi file locate or the perl interperter
path?
Thx ..
regards,
Vincent Lee
------------------------------
Date: Fri, 15 Jan 1999 14:03:25 +0000
From: Michael Preminger <michael.preminger@jbi.hioslo.no>
Subject: Error testing the C::scan module before installation
Message-Id: <369F4AAD.DCD8C74@jbi.hioslo.no>
Hello!
I have downloaded C/scan module version 0.5, and built it on a linux
red-hat 5.2
on testing it stops at the fifth test, saying:
Expecting parenth after identifier in `int32_t __random (void) '
after `int32_t ' at /Cscan/C-Scan-0.5/blib/lib/C/Scan.pm line 494.
make: *** [test_dynamic] Error 9
The refered text is not in the refered line, not even in the file.
Besides I do not suppose I am expected to
mend a code of a (probably well tested) module.
What is going on here?
Thanks
M.
--
Michael Preminger
Forsker / Research Scientist
Avdeling for journalistikk,
bibliotek- og informasjonsfag /
Faculty of Journalism, Library and
Information Science
Hxgskolen i Oslo / Oslo College
http://www.hioslo.no/~michaelp
Pilestredet 52, N-0167 Oslo
Voice: +47-22452778
Fax: +47-22452605
E-mail: michael.preminger@jbi.hioslo.no
------------------------------
Date: Fri, 15 Jan 1999 10:42:08 GMT
From: vulcan_savik@my-dejanews.com
Subject: Finding the last URL that was accessed
Message-Id: <77n61v$tlo$1@nnrp1.dejanews.com>
Hi there,
I hope that someone can help me ....
I'm writing a script that needs (as the major input) the URL of the last
page that was accessed before the script was called ....
Im other words I'm looking for a way to do a javascript:history.go(-1) type
operation but implement it in PERL instead ... and return the URL.
any help is gratefully accepted.
can you e-mail me as well as posting solutions to this news groups
Many thanks
Colin Bell
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 15 Jan 1999 05:58:29 -0700
From: jim <webmaster@link-maker.com>
Subject: Re: Finding the last URL that was accessed
Message-Id: <369F3B72.5F5C42F6@link-maker.com>
colin-
there is really no parallel between perl and jscrit, BUT,
what you want is
$url=$ENV{'HTTP_REFERER'};
vulcan_savik@my-dejanews.com wrote:
>
> Hi there,
>
> I hope that someone can help me ....
>
> I'm writing a script that needs (as the major input) the URL of the last
> page that was accessed before the script was called ....
>
> Im other words I'm looking for a way to do a javascript:history.go(-1) type
> operation but implement it in PERL instead ... and return the URL.
>
> any help is gratefully accepted.
>
> can you e-mail me as well as posting solutions to this news groups
>
> Many thanks
>
> Colin Bell
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 15 Jan 1999 07:58:02 -0500
From: Jay Flaherty <fty@utk.edu>
To: vulcan_savik@my-dejanews.com
Subject: Re: Finding the last URL that was accessed
Message-Id: <369F3B5A.2341759D@utk.edu>
vulcan_savik@my-dejanews.com wrote:
>
> Hi there,
>
> I hope that someone can help me ....
>
> I'm writing a script that needs (as the major input) the URL of the last
> page that was accessed before the script was called ....
>
> Im other words I'm looking for a way to do a javascript:history.go(-1) type
> operation but implement it in PERL instead ... and return the URL.
>
> any help is gratefully accepted.
#!/usr/local/bin/perl -Tw
use strict;
use CGI;
my $q = new CGI;
print $q->header;
print $q->start_html(-title=>"Print Last Page Visited");
print "You were previously visiting ", $q->referer();
exit;
__END__
This is just the "CGI.pm way" of using the environment variable
$ENV{'HTTP_REFERER'}.
2 caveats:
1. Not all browsers set this variable.
2. If the user accesses your site via a bookmark, or by typing in your
url directly, this variable will be meaningless.
------------------------------
Date: Fri, 15 Jan 1999 06:03:16 -0700
From: jim <webmaster@link-maker.com>
Subject: Fork me! need children
Message-Id: <369F3C90.F41D33AD@link-maker.com>
hehe, I'd like a good reference to learn more about forking in perl...
I'm sure some one knows an excellent site or faq..or..book?
Too many sequential proceses goin on in one place...
thanks
------------------------------
Date: Fri, 15 Jan 1999 05:39:24 -0700
From: jim <webmaster@link-maker.com>
Subject: Re: FORM to two different CGI?
Message-Id: <369F36F9.AEB3C01E@link-maker.com>
Gleb,
you need LWP::Request
and maybe HTTP::Headers
that way you can use the first script to query the second...
or maybe just write a script that just does the querying
-Jim
Gleb Ekker wrote:
>
> Hi,
>
> Please help me! I have FORM on my page which is need to be sent to two
> different CGI scripts on two different servers. Is it possible to put
> two URLs in <FORM ACTION=...>, or there is some other way to fix this
> problem?
>
> Thanks,
> Gleb.
------------------------------
Date: Fri, 15 Jan 1999 09:17:03 GMT
From: nortinor@norikomail.com
Subject: Free CGI (and Perl) enabled Web-hosting/provider
Message-Id: <77n12a$ppq$1@nnrp1.dejanews.com>
This CGI service supports Perl
I know that some of you have been looking for a service like this, a twist
to the ONLY free web-hosting and e-mail. This one is a free web-hosting
provider that permits perl supported CGI scripts, a first version is
available at:
http://www.cgirealm.com but users need to register at www.graffiti.net first
and they can automatically get CGI access.
CGI uploads are all done via FTP, so no fancy web interfaces just yet, but
it should be enough for scripting. File read/write allowed in the users
particular file directory.
Please have a look at this service, and let us know what you think of it.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 15 Jan 1999 11:51:29 +0000
From: Etienne Pollard <not@giving.it.out>
Subject: glob error
Message-Id: <369F2BC0.20F1FC4E@giving.it.out>
I have the following code:
!#/usr/bin/perl -w
@another = </home/webroot*>;
foreach (@another) {
print "$_\n";
}
When I run it I get the following error:
Can't modify not in scalar assignment at glob.pl line 3, near
"</home/webroot*>;"
Execution of glob.pl aborted due to compilation errors.
I'm running Red Hat Linux 5.02, Perl 5.004.
/home/webroot is not an empty directory.
I can't see anything wrong with this code and would really appreciate
some assistance on this.
Etienne Pollard
------------------------------
Date: Fri, 15 Jan 1999 13:17:24 +0300
From: "Sergey" <y@mail.ru>
Subject: how can I subscribe for this group?
Message-Id: <77n4jp$p4f@green.kosnet.ru>
Hi!
Can I receive this newsgroup as a mailing list? If yes, please, tell me how.
Thanks in advance.
Sincerely,
Sergey
y@mail.ru
------------------------------
Date: Fri, 15 Jan 1999 16:03:19 +0300
From: Igor Proskuriakov <IProskuriakov@mfkren.com>
Subject: How to get IP address of a local machine under NT
Message-Id: <48FC486C150DD211BFC600805FA727C7017223FC@E01MOS.rencap.com>
Hi, there!
Could you please tell me how I can get an IP address of a local computer
running Windows NT, assuming that it has only one network card.
Cheers,
Igor Proskuriakov
------------------------------
Date: Fri, 15 Jan 1999 06:13:35 -0700
From: jim <webmaster@link-maker.com>
To: webmaster@lifesprings.net
Subject: Re: inclue text file in cgi output
Message-Id: <369F3EFC.1764833F@link-maker.com>
try something like...
@page being the normal output
for (@page){
if(/<!--%%%-->/)
{print $file;}
else{print $_;}
}
-jim
webmaster@lifesprings.net wrote:
>
> Hi,
>
> I'm trying to include a text file in my cgi output. basically to replace the
> ssi call located in my "pageheader" that doesn't work with cgi output. It
> works fine on the rest of my site when I'm serving SSI pages. However, when I
> serve the cgi output from, for example, my search script, the SSI stuff isn't
> there.
>
> So, I'd like to substitute a <!--%%%--> comment line with the text file. In
> an SSI html page the comment wont be seen and in the cgi output the #inclue
> virtual SSi call wont be seen. I'd like it to look like the rest of my html
> pages.
>
> my site is at www.lifesprings.net
>
> notice the Announcements on the right that are loaded with SSI.
>
> How can I load that text file in the cgi output. With the substitue command?
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 15 Jan 1999 09:14:54 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: kwlii: Formatting numbers in Perl ?
Message-Id: <ebohlmanF5LGCu.InC@netcom.com>
kwlii <kwlii@bigfoot.com> wrote:
: In COBOL you can create an edit mask for formatting numbers
: ie: 28888.00 = $28,888.00 with a PIC $zz,zzz.99
: How do you format a number to include the , and the $.
Check out Number::Format, available at your nearest CPAN site.
------------------------------
Date: 15 Jan 1999 14:44:41 GMT
From: "Kenneth LaRue" <kwlii@worldnet.att.net>
Subject: kwlii: Formatting Numbers
Message-Id: <77nk8p$k59@bgtnsc02.worldnet.att.net>
Hello,
I have done a search on the CPAN sites for Number::Format. For some
reason the search engine changes the capital letters to lower case
and I cannot seem to find anything on the topic. Would anyone
happen to have a URL or site name that could point me to the
documentation.
Thanks in advance.
kwlii
------------------------------
Date: Fri, 15 Jan 1999 10:16:51 GMT
From: dave@mag-sol.com
Subject: Re: Looking for Perl programmer in NYC area
Message-Id: <77n4id$shl$1@nnrp1.dejanews.com>
In article <397lup4n84.fsf@ibnets.com>,
Uri Guttman <uri@ibnets.com> wrote:
> >>>>> "bdf" == brian d foy <comdog@computerdog.com> writes:
>
> bdf> you might try the nyc-perl-jobs list:
>
> bdf> send to: majordomo@hfb.pm.org
> bdf> in body: subscribe nyc-perl-jobs
>
> bdf> brought to you by the New York Perl Mongers :)
>
> hey brian,
>
> what about creating more jobs lists for other pm's? or a open one for
> telework? and how can we get those lists some publicity?
This is something I've been thinking about too. I've had two or three mails in
the last few weeks from people that have found the London.pm web page and are
looking for Perl programmers... and we've always got a couple of members taht
are looking for a bit of extra work.
Maybe we should take this to the pm groups mailing list.
Dave...
--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 15 Jan 1999 19:36:07 -0600
From: Sivakumar Gurumurthy <sivag@cisco.com>
Subject: Looking for RCP/RSH Client written in Perl
Message-Id: <369FED07.1E70D734@cisco.com>
Hi,
I am looking for RCP/RSH client written in Perl to be used in Windows NT
platform. Any help is greatly appreciated.
Thanks
Vanniarajan C
vrajan@cisco.com
------------------------------
Date: Fri, 15 Jan 1999 07:24:33 -0500
From: Ken McNamara <conmara@tcon.net>
To: James Cameron <james@MatadorDesign.com>
Subject: Re: Losing linefeeds when encrypting email
Message-Id: <369F3381.6716C903@tcon.net>
James -
Isn't that the difference between 'ascii' and 'binary' in FTP? (it
messes with the cr/lf for a reason buried in UNIX lore)
Sounds like somewhere in the process the binary result is being handled
as if it were ASCII - with the resulting changes.
KenMc
James Cameron wrote:
> Hi,
>
> I have a question about lost carriage returns/linefeeds when pgp
> encryting an email message.
>
> Description:
>
> I have a perl script running on a Unix server which takes an existing
> electronic mail message, encrypts it, and then sends it to the
> appropriate people. The script works great except that when the
> recipient open and decrypts the message (using Eudora on Windows
> 95/98) there are no carriage returns (or if they are there, they are
> not understood). On the mac side, there is an odd character at the
> end of every line but at least there are indeed carriage returns.
>
> System info:
>
> PGP version: linux50ib8
>
> Server System: BSDI 3.1
>
> Email: sending via standard SMTP. Receiving in Eudora using PGP
> for Personal Privacy.
>
> Encryption call: $pgp -r $user -r $user2 -o $encrypted -af $message
>
> Any suggestions or pointers would be much appreciated.
>
> -James Cameron
> Matador Design, Inc.
> http://www.MatadorDesign.com
------------------------------
Date: Fri, 15 Jan 1999 14:27:08 GMT
From: droby@copyright.com
Subject: Re: Perl Criticism
Message-Id: <77nj7h$8io$1@nnrp1.dejanews.com>
In article <77hgnn$1u2$1@nnrp1.dejanews.com>,
topmind@technologist.com wrote:
> In article <369AD320.7F59EBC2@c-zone.net>,
> chatmaster@c-zone.net wrote:
> > [...]
> > links, out of curiosity (for jobs) that you posted, and of course, I
> > felt
> > it "odd" that you claimed to be an expert in Perl programming, when you
> > obviously aren't. That's all I said, you wacko... why is that sort
> > difficult to read? After all, you posted it.
>
> I NEVER CLAIMED TO BE AN "EXPERT" YOU LIER!!!
>
> I claimed to know "some".
You claimed to specialize.
*plonk*
--
Don Roby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 15 Jan 1999 12:55:21 GMT
From: eric@nafex.comi (Eric Smith)
Subject: Regex challenge
Message-Id: <slrn79ueln.2m2.eric@eric.nafex.com>
Hi perl
Double barrelled s/gun/question/ ;)
1) I want to match a word, say `table' but the character \& or ampersand
can appear anywhere in table so all these are legal:
\&table
t\&able
ta\&ble
... [snip] ...
table\&
any elegant solutions for my regex?
2) I want to march a lower case, upper case or mixed word and _replace_ it
with the same case layout in the new word
so
Table becomes Chair
TABLE becomes CHAIR
table becomes chair
thanx guys.
this list is so big, so please cc me in case I miss a gem.
--
Eric Smith (eric@nafex.com)
Tel 0027 82 780 7888 (vodacom)
------------------------------
Date: Fri, 15 Jan 1999 05:47:12 -0700
From: jim <webmaster@link-maker.com>
Subject: Re: Search engine help
Message-Id: <369F38CD.9AEFE03D@link-maker.com>
mind---
I believe if you're on a unix server, '/htdocs' represents root/htdocs.
kinda like /usr/bin or /tmp/....etc
try /usr/bin/home/mind/htdocs
more typing but more reliable...
-Jim
Mind Logic wrote:
>
> I'm using the Simple Search Perl script
> from http://www.worldwidemart.com/scripts/ and have encountered a problem.
> I've successfully chmoded everything, and have changed all the variables (or
> at least I think I have) to reflect the server. Here's my variables.
>
> $basedir = '/htdocs';
> $baseurl = 'http://209.240.134.108/';
> @files = ('*.shtml','*.html');
> $title = "Mind Logic";
> $title_url = 'http://209.240.134.108/';
> $search_url = 'http://209.240.134.108/search.html';
>
> The URL for the script is at http://209.240.134.108/search.html (you can use
> multistandard.com too but the domain names isn't supposed to clear for
> another 7 hours about).
>
> There's currently only two files on the server at
> http://209.240.134.108/index.shtml and http://209.240.134.108/test.html but
> when I type in something like test nothing shows up in the search results.
>
> Anyone know a solution to this?
------------------------------
Date: Fri, 15 Jan 1999 13:58:48 GMT
From: gigatronman@email.com (Giga Tron)
Subject: Re: Searching a string, with a headache, example
Message-Id: <369f4913.5575427@news.mtt.net>
This is one wayt, actually the way I see it working best.
open(FILE,"$outpath$filetoread") || die "I can't open that file
$outpath$filetoread \n";
$filesize = -s FILE;
$readlen = read FILE, $indata, $filesize;
if ($readlen != $filesize) { print "only read $readlen of file size
$filesize\n"};
$hrectest = "HREC>>";
$hrec = index($indata, $hrectest);
$hrec4 = ($hrec + 6);
($begseg) = $indata =~ /\|([^|]+)\|/;
$lenght = length $begseg;
@etryt = split (/&/, $indata);
($invnum, $pod, $pon, $nofd, $idc, $nman, $idc2, $qty1, $uofm, $cost,
$upc, $pack, $size, $uom2, $weight, $wuc, $nus, $uomc, $wt, $total) =
@etryt;
close(FILE);
------------------------------
Date: Fri, 15 Jan 1999 13:18:39 GMT
From: gigatronman@email.com (Giga Tron)
Subject: Searching a string, with a headache
Message-Id: <369f3db0.2660665@news.mtt.net>
Hi fellow nerds,
I have a unique situation,
I have to read a file that can be any size, and contain unstructured
data. The file could be like this.
stuff|morestuff*morestuff*morestuff*morestuff|evenmorestuff*evenmorestuff|stuff|morestuff*morestuff*morestuff*morestuff|evenmorestuff*evenmorestuff|stuff|morestuff*morestuff*morestuff*morestuff|evenmorestuff*evenmorestuff|
Notice | and *
The | specifies the beginning of a record, and the * specifies a field
in a record. The tricky thing is to be capable to read the file until
a | occurs, count the number of spaces and return that value to a sub
routine. Say the value was 6. The good thing is that all records are
one size only, and there are only about twenty. So depending on the
size between the | a sub is run that collects the info between the |
and puts then into a scalar.
Then I must continue the search for the | and get the number of spaces
between the last | and the one just found. I see a few ways of doing
this but was wondering if there are a few PERL junkies that could
suggest some code to make it work smoother.
Giga Tron Man
gigatronman@email.com
------------------------------
Date: 15 Jan 1999 13:47:30 GMT
From: koos_pol@nl.compuware.com.NO_JUNK_MAIL (Koos Pol)
Subject: Re: Searching a string, with a headache
Message-Id: <77ngti$3ku@news.nl.compuware.com>
On Fri, 15 Jan 1999 13:18:39 GMT, Giga Tron <gigatronman@email.com> wrote:
[lot snipped]
| I see a few ways of doing
| this but was wondering if there are a few PERL junkies that could
| suggest some code to make it work smoother.
We don't cook instant code for you. Show us what you've come up with
so far and we will help you get further.
--
Koos Pol
----------------------------------------------------------------------
S.C. Pol - Systems Administrator - Compuware Europe B.V. - Amsterdam
T:+31 20 3116122 F:+31 20 3116200 E:koos_pol@nl.compuware.com
Check my email address when you hit "Reply".
------------------------------
Date: Fri, 15 Jan 1999 07:08:38 -0700
From: jim <webmaster@link-maker.com>
Subject: Re: Searching a string, with a headache
Message-Id: <369F4BE4.5B934ACA@link-maker.com>
all I can say is
@stuff=split('|',$line);
@more=split('*',$stuff[0])
Giga Tron wrote:
>
> Hi fellow nerds,
speak for yourself...
> I have a unique situation,
>
> I have to read a file that can be any size, and contain unstructured
> data. The file could be like this.
>
> stuff|morestuff*morestuff*morestuff*morestuff|evenmorestuff*evenmorestuff|stuff|morestuff*morestuff*morestuff*morestuff|evenmorestuff*evenmorestuff|stuff|morestuff*morestuff*morestuff*morestuff|evenmorestuff*evenmorestuff|
------------------------------
Date: Fri, 15 Jan 1999 14:00:45 GMT
From: gigatronman@email.com (Giga Tron)
Subject: Set current position in a file
Message-Id: <369f49c7.5755816@news.mtt.net>
Hello All,
how can I set the current position in a file. do something and then
continue from that position
------------------------------
Date: 15 Jan 1999 14:11:37 GMT
From: meowing@banet.net (Fluffy)
Subject: Re: Set current position in a file
Message-Id: <77nial$61p@meow.invalid>
Giga Tron <gigatronman@email.com> wrote:
> how can I set the current position in a file. do something and then
> continue from that position
See the 'seek' and 'sysseek' sections in perlfunc.
--
"Meow." --me
------------------------------
Date: Wed, 13 Jan 1999 09:16:24 +0800
From: "wtsai" <wtsai@ms.chttl.com.tw>
Subject: Re: Socket in Perl - help??????
Message-Id: <77gs0q$i8g@beast-2.news.chttl.com.tw>
Fluffy <6<g)s$e39 <77eqp7$ddj@meow.invalid>...
>wtsai <wtsai@ms.chttl.com.tw> wrote:
>> I am writing client/server program by Perl. The client sends data to
>> the server and receives the response from the server on the same
>> Socket connection. The question is: once the client sends binary
>> data through the socket connection, then it won't receive any respose
>> from the server. For the character string, the program works fine!
>
>You are probably blocking. Can you post some sample code to
>demonstrate the problem?
>--
>"Meow." --me
Thank you for your attention! I finally figured it out. The problem is that
before
sending data to socket, I opened a file using:
undef $/; ### read whole paragraph
$*=1; ### multiple line matching
This really blocks the socket. But I still don't know why!
------------------------------
Date: 15 Jan 1999 13:23:30 +0100
From: robert@il.fontys.nl (robert)
Subject: Re: sockets: server-side problem
Message-Id: <77nc02$gji@charm.il.fontys.nl>
"Benjamin" <bench@surfshop.net.ph>:
>How do I handle the escape character "^]" when a client tries to connect
>to the server using "telnet port#" and types the escape character and at
>the prompt " > quit " ?
>After quitting, a 'ps auxw | grep server' shows the spawned 'server' is
>still there e.g.:
>
>bench 28119 0.0 1.1 2108 1504 p1 S 14:42 0:00 perl
>./server
>bench 28211 83.6 31.7 41192 40584 p1 R 14:43 34:34 perl ./server
>
>If a client connects again using telnet to the port# of the server a new
>spawned "server" is created and when the client quits, the spawned server
>remains. Does anyone have an idea on how can I solve this problem?
It depends on how your server is implemented. A way to notice that the
remote site 'hung up' is when a read from the socket fails. Another way to
notice it is when you try to write to a socket and your process receives
a SIGPIPE signal. If you're using select(), the usual way of detecting a
hangup is when select() returns stating there's new data to read, but a
read will fail (or rather: the system-call read() will return 0).
I hope I've provided enough information for you to solve your problem.
robert
------------------------------
Date: Fri, 15 Jan 1999 08:30:47 -0600
From: Gareth Jones <sheridan@cableregina.com>
Subject: Stopping <ctrl>-c during perl Scripts (win32)
Message-Id: <369F5117.E0BAF4C6@cableregina.com>
I have a script I've written that I need all users to run. I don't want
them stopping it
with a control - c or a control break. Is there any way to do this?
I will be running the scripts on evil 95 and NT stations.
Thanks.
------------------------------
Date: Fri, 15 Jan 1999 14:04:00 +0100
From: Christine pourcelot <Christine.Pourcelot@inria.fr>
Subject: troubles with "exec prog ...>>file1..."
Message-Id: <369F3CC0.EC915F43@inria.fr>
Hi
I'm porting some Perl scripts from Linux to NT
I've some troubles with an "exec" that works well on Linux but not on
NT :
system "sch prompt=sch-in print=sch-out error=sch-err 1>> sch-out 2>>
sch-err";
sch.exe is a C program and this command line under bbash (I'm using
cygwin32 B20.1) is ok but thru Perl, i got this message message :
std_print_outinit function, open file `sch-out' failure
Can anybody help ?
thanks
cheers
--
Christine Pourcelot
Stagiaire projet CODES
INRIA ROCQUENCOURT
tel : 01 39 63 57 70
------------------------------
Date: Fri, 15 Jan 1999 20:49:21 +0800
From: "Jamie Bekkers" <jtb@bekkers.com.au>
Subject: Re: Using a Form in HTML and a Perl Script.
Message-Id: <77ne8r$gjm$1@news.bekkers.com.au>
Ted,
Thanks for the direction.
Subscribed to the other groups.
Regards
Jamie.
Tad McClellan <tadmc@metronet.com> wrote in message
news:fn1j77.bc5.ln@magna.metronet.com...
>Jamie Bekkers (jtb@bekkers.com.au) wrote:
>
>: Thanks Ted,
>
> You're welcome James.
>
>
>: That is not my problem, I wanted someone to help me create a html form to
>: pass variables to the script.
>
>
> Well you were right then.
>
> This is the wrong newsgroup.
>
> We discuss Perl here.
>
>
> There is a different newsgroup for discussing HTML:
>
> comp.infosystems.www.authoring.html
>
>
> Of, if you want to discuss the <form> HTML element:
>
> comp.infosystems.www.authoring.cgi
>
>
>--
> Tad McClellan SGML Consulting
> tadmc@metronet.com Perl programming
> Fort Worth, Texas
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 4658
**************************************