[12351] in Perl-Users-Digest
Perl-Users Digest, Issue: 5951 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 10 16:07:17 1999
Date: Thu, 10 Jun 99 13:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 10 Jun 1999 Volume: 8 Number: 5951
Today's topics:
"use IO::Socket" hangs (Lauren Weinstein)
**ANY HELP APPRECIATED******* dmeyers@tisny.com
Re: alt.perl post of the millennium <cassell@mail.cor.epa.gov>
Re: can i variably name an array? (Eric Bohlman)
can't run a java App with my perl script using apache nicolased@my-deja.com
E-mail a file as an attachment. <jmorey@moreynet.com>
Re: Emailing Binary Files <cassell@mail.cor.epa.gov>
Re: Examples, sources and tutorials <cassell@mail.cor.epa.gov>
holding shell output in perl (Steve .)
Re: How do I write CGI in C++? <cassell@mail.cor.epa.gov>
how to read excel file ? <kkethine@cisco.com>
Re: How to write TO a socket? (client/server socket stu <aqumsieh@matrox.com>
Re: indexing into a hash <aqumsieh@matrox.com>
Re: NT DBI Install Problem <geostat@mindspring.com>
Re: NT DBI Install Problem <craig@mathworks.com>
Re: Perl script to purge old messages in mailboxes ? <sgifford@tir.com>
Perl String , RE 's jatgirl@yahoo.com
quiz for perl professionals <kgnews@olympiakos.com>
Re: Regular Expresion <xpalo03@vse.cz>
Requesting help in optimizing (Alan Young)
Require "No NT commands" on UNIX <anonymous@web.remarq.com>
Search and replace jhagerty@my-deja.com
Sockets problem: solution and question <caa@strata-group.com>
Re: Using CGI.pm (Hasanuddin Tamir)
Re: What's the "halting problem"? <jdporter@min.net>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 10 Jun 1999 18:43:59 GMT
From: lauren@vortex.com (Lauren Weinstein)
Subject: "use IO::Socket" hangs
Message-Id: <FD4K1B.Lx4@vortex.com>
Greetings. A newly compiled 5.005_03 perl, which passed installation
tests, exhibits the behavior that any program that includes:
use IO::Socket
immediately hangs at that point. Any clues appreciated!
Thanks much.
--Lauren--
Lauren Weinstein
Moderator, PRIVACY Forum -- http://www.vortex.com
Member, ACM Committee on Computers and Public Policy
Host, "Vortex Daily Reality Report and Unreality Trivia Quiz"
-- http://www.vortex.com/reality
------------------------------
Date: Thu, 10 Jun 1999 17:47:48 GMT
From: dmeyers@tisny.com
Subject: **ANY HELP APPRECIATED*******
Message-Id: <7joto1$oao$1@nnrp1.deja.com>
Can anyone suggest where I can find an Engineer with Javascript/C/UNIX
experience for a contract opportunity with a Fortune 1000 firm in San
Francisco, Ca? Please contact dmeyers@tisny.com. Thank you!
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 10 Jun 1999 11:24:00 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: alt.perl post of the millennium
Message-Id: <376002C0.2FF62EE4@mail.cor.epa.gov>
Uri Guttman wrote:
>
> this person should not be allowed near anything more complicated than a
> popup toaster.
Errm, he probably already has severe burns from that. Have you
warned him not to fish the toast out with a knife while the
thing is plugged in?
> we are all going to aohell in a handbasket.
Don't forget hotmail and deja, which IIRC, have contributed more
truly doofoid posts here in the past 6 months than AOhelL.
> i am not charging enough for
> my services. does anything really matter?
Charge more for your services. Bill Gates says that everything
looks better when you have rose-colored glasses that are made
especially for you by Venetian glassblowers under the personal
direction of Vuitton. But then, he doesn't answer Usenet
questions, does he?
One more point (if I have one anywhere in here): this wasn't
even the worst post I've seen in the last 6 weeks.
My personal favorite is still the reply to TomC that said
(more or less) "Who do you think you are? Some great Perl
God who writes tons of free Perl code?" D'oh. I sent the
guy a note, and he replied privately that as soon as he fired
off the post and watched it appear in the ng, he turned
around and saw who the names on two O'Reilly Perl books
on his desk... Heh.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 10 Jun 1999 18:17:08 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: can i variably name an array?
Message-Id: <ebohlmanFD4IsL.HDH@netcom.com>
Eric The Read (emschwar@rmi.net) wrote:
: script kiddies != Perl programmers
: script kiddies are those who take ready-made programs that break things--
: usually DOS attacks on an ISP or company-- but have no actual
: comprehension of what makes them work. Some few of them (the few that
: generate said scripts or programs) might, but it's generally a very
: ad-hoc understanding, with little (if any) formalism, and often lots of
: useless cruft.
More technically, they're people who attempt to write/modify code without
having a mental model of the language. They think in terms of "what do I
have to type to make this happen." For them, snippets of code are magic
incantations and are atomic. They are to programming what prooftexters
are to theology.
------------------------------
Date: Thu, 10 Jun 1999 16:10:53 GMT
From: nicolased@my-deja.com
Subject: can't run a java App with my perl script using apache
Message-Id: <7joo23$lrs$1@nnrp1.deja.com>
I run a java application in my perl code using :
system("java","ConsultServer");
perl code alone run fine but when I put it in the cgi-bin of an apache
Win 98 server.It don't work.
consultserver.java is a prog that generates a result.txt from query.txt.
When run through a APACHE Win32 server in the cgi-bin directory
result.txt become a blank file of 0 kb.
but it works fine when I run it from the windows shell
../cgi-bin/perl myprog.cgi
any idea ??
Thanx
nicolas
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 10 Jun 1999 14:28:09 -0500
From: "Jon C. Morey" <jmorey@moreynet.com>
Subject: E-mail a file as an attachment.
Message-Id: <376011C9.36F3113E@moreynet.com>
I am using the SENDMAIL program to send a message via perl. It was
quite easy to print the lines and get a file sent. I would like to send
a file as an attachment. Can I do this via SENDMAIL or do I need a
mime package?
--
********************************************************************
Jon C. Morey
Director of Marketing, Planning, and Implementation
jmorey@moreynet.com
913-851-9993 - Office
913-851-8399 - FAX
Morey Enterprises, Inc.
11730 W. 135th Street, Suite 30
Overland Park, KS 66221
------------------------------
Date: Thu, 10 Jun 1999 11:01:27 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Emailing Binary Files
Message-Id: <375FFD77.7803B1B3@mail.cor.epa.gov>
Andrzej Filip wrote:
>
> rad91@my-deja.com wrote:
>
> > I'm interested in a module/technique I can use to email binary files.
> > I assume that I would first have to encode the file to base64. Is that
> > correct? How would I do that? Your help would really be appreciated.
>
> Have you tried mime::LITE ?
Umm, to be picky, that is MIME::Lite, which is available at
CPAN, as well as in PPM form for users of ActiveState Perl.
Perl is pretty case-sensitive on stuff like this.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 10 Jun 1999 12:06:15 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Examples, sources and tutorials
Message-Id: <37600CA7.D385F15A@mail.cor.epa.gov>
Thomas Weholt wrote:
> Is there a site on the net with lots of simple scripts, examples of
> whole programs etc.?
Yes.
As a matter of fact, there are hundreds (or thousands) of
websites, with hundreds (or thousands) of Perl scripts apiece.
Just go to Yahoo or Alta Vista or whatever webcrawlers you like,
and search. You won't have a problem finding Perl stuff.
You'll have a problem weeding out a smaller number of sites
worth checking. Sturgeon's Law definitely applies here.
So you'll have to be more specific about what kinds of programs
you want to see.
BTW, did you know that the Perl on your system comes with
tons of documentation which includes oodles of programs and
code snippets already? That could be a good starting point...
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 10 Jun 1999 18:49:18 GMT
From: syarbrou@nospam.enteract.com (Steve .)
Subject: holding shell output in perl
Message-Id: <37600843.63845267@news.enteract.com>
I have a perl script that calls rdist to do a system copy. RDIST
outputs things as it goes along to the screen. I want that output to
be caught by the perl script before it hits the screen and modified
per my instructions. How do you catch the output being displayed by a
system call? Thanks.
Steve
remove "nospam" from address when responding thru email.
------------------------------
Date: Thu, 10 Jun 1999 11:48:09 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How do I write CGI in C++?
Message-Id: <37600869.CB3A3AF@mail.cor.epa.gov>
Elia Weiss wrote:
> Hi,
> I want to write a CGI in C++ (usually I use TCL/tk)
'a CGI'? Errm, you are aware that CGI is a spec, and that one
writes 'CGI scripts', right? Just wondering. If you
usually use Tcl (watch the case), why aren't you asking in
a Tcl newsgroup?
And why on earth would you want to write a CGI script in
C++ ?
> but I don't know how to reach the environment variable
> (i.e. The data that being send by the user/browser
> and being set by the server as global/enviormment variable)
But that has nothing to do with the language used in the
CGI script. That's a question for one of the www or cgi
newsgroups. Like maybe comp.infosystems.www.authoring.cgi
for example. But be aware that the data sent by the browser
is incredibly easy to spoof, and many browsers don't send
all the stuff that could be in there.
> So I do reach does var's?
Any decent language equipped to do CGI programming can
access them.
> Is there any special Lib to work with CGI's?
In what language? C++ ? If you want that answer,
you really should be asking in a C++ newsgroup.
> Is there any reason way not writing a CGI in c++ (i.e. versus. TCL)?
How about Perl? Tcl and C++ are both sub-optimal choices
for most web programming tasks. Or for that matter, try
Java instead of C++ . Do *not* try Javascript in place
of Java. They're *very* different.
> Is there a better forum I should present this kind of questions?
Out of the 17,000 newsgroups in Usenet, perhaps a hundred
would have been more appropriate than this one. This group
is for the Perl programming language, not C++ or Tcl or CGI.
Some people will tell you that the number of more appropriate
groups is actually closer to 16,990 out of 17,000. They're
exaggerating. Well, a little. ;-)
> Thanks
> Elia Weiss
Please don't ask non-Perl questions here. TIA.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 10 Jun 1999 12:10:54 -0700
From: "Gopal Kethineni" <kkethine@cisco.com>
Subject: how to read excel file ?
Message-Id: <7jp27n$m94$1@news-sj-3.cisco.com>
How do I read MS-Excel file in perl for unix and manipulate the
data and save it in text format?
Thanks in advance
KG
------------------------------
Date: Thu, 10 Jun 1999 13:57:50 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
To: riktait@aol.com (RikTAIT)
Subject: Re: How to write TO a socket? (client/server socket stuff)
Message-Id: <x3y7lpcq6ox.fsf@tigre.matrox.com>
[posted and CCed]
riktait@aol.com (RikTAIT) writes:
Note: The following code is taken from the Panther (Advanced Perl
Programming, by Srinivasan, published by O'Reilly), chapter 12, pages
192-193.
> Can someone give me some quick and dirty code, two programs:
> 1) server code that accepts connections on a port and then basically
> prints to stdout out anything that is sent to it via the port?
use IO::Socket;
$sock = new IO::Socket::INET(
LocalHost => 'hostname',
LocalPort => 12345,
Proto => 'tcp',
Listen => 5,
Reuse => 1,
);
die "Can't create socket: $!\n" unless $sock;
while ($new_sock = $sock->accept()) {
while (defined ($buf = <$new_sock>)) {
print $buf;
}
}
close $sock;
> 2) client code that connects to said port and writes a sentence to
> that port and then exits
use IO::Socket;
$sock = new IO::Socket::INET(
PeerAddr => 'hostname',
PeerPort => 12345,
Proto => 'tcp',
);
die "Can't create socket: $!\n" unless $sock;
print $sock "This message will appear at the server.\n";
close $sock;
> I know I am *so* close - I am just missing something pretty
> fundamental.
Have a look at the Panther. Chapter 12 is very enlightening. Also the
Ram in pretty useful in your case.
HTH,
Ala
------------------------------
Date: Thu, 10 Jun 1999 13:12:59 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: indexing into a hash
Message-Id: <x3y909sq8ro.fsf@tigre.matrox.com>
Jim Keefer <jim@sismicro.com> writes:
> It would save time and a lot
> of space if I could store it once in a hash, but still be able to access
> the hash either by string key to get the index, or get the hash key by
> using an integer index.
If I understand correctly, you want to access elements in the hash by
either key or value. Then you should look at perlfaq4:
How do I look up a hash element by value?
HTH,
Ala
------------------------------
Date: Thu, 10 Jun 1999 15:07:37 -0400
From: George Statham <geostat@mindspring.com>
Subject: Re: NT DBI Install Problem
Message-Id: <37600CF9.D1B9E273@mindspring.com>
These functions are in kernel32.lib. Get rid of the -nodefaultlib parameter
and it should compile.
George
wbratton wrote:
> I'm attempting to install DBI on NT. I get the link errors below can
> anyone help...
>
> DBI.c
> link -out:blib\arch\auto\DBI\DBI.dll -dll -nologo -nodefaultlib
> -release
> -machine:x86 DBI.obj
> I:\activeperl\5.00502\lib\MSWin32-x86-object\CORE\perlCA
> PI.lib i:\activeperl\5.00502\lib\MSWin32-x86-object\CORE\PerlCRT.lib
> -def:DBI.de
> f
> Creating library blib\arch\auto\DBI\DBI.lib and object
> blib\arch\auto\DBI\DBI
> .exp
> DBI.obj : error LNK2001: unresolved external symbol
> __imp__Perl_no_security
> perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
> __imp__In
> itializeCriticalSection@4
> perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
> __imp__De
> leteCriticalSection@4
> PerlCRT.lib(dllmain.obj) : error LNK2001: unresolved external symbol
> __imp__Disa
> bleThreadLibraryCalls@4
> blib\arch\auto\DBI\DBI.dll : fatal error LNK1120: 4 unresolved externals
>
> NMAKE : fatal error U1077: 'link' : return code '0x19'
> Stop.
------------------------------
Date: Thu, 10 Jun 1999 15:14:29 -0400
From: Craig Ciquera <craig@mathworks.com>
Subject: Re: NT DBI Install Problem
Message-Id: <37600E95.1D01349E@mathworks.com>
If you are using the ActiveState PERL, then do this:
ppm install DBI
Craig
George Statham wrote:
> These functions are in kernel32.lib. Get rid of the -nodefaultlib parameter
> and it should compile.
>
> George
>
> wbratton wrote:
>
> > I'm attempting to install DBI on NT. I get the link errors below can
> > anyone help...
> >
> > DBI.c
> > link -out:blib\arch\auto\DBI\DBI.dll -dll -nologo -nodefaultlib
> > -release
> > -machine:x86 DBI.obj
> > I:\activeperl\5.00502\lib\MSWin32-x86-object\CORE\perlCA
> > PI.lib i:\activeperl\5.00502\lib\MSWin32-x86-object\CORE\PerlCRT.lib
> > -def:DBI.de
> > f
> > Creating library blib\arch\auto\DBI\DBI.lib and object
> > blib\arch\auto\DBI\DBI
> > .exp
> > DBI.obj : error LNK2001: unresolved external symbol
> > __imp__Perl_no_security
> > perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
> > __imp__In
> > itializeCriticalSection@4
> > perlCAPI.lib(perlCAPI.obj) : error LNK2001: unresolved external symbol
> > __imp__De
> > leteCriticalSection@4
> > PerlCRT.lib(dllmain.obj) : error LNK2001: unresolved external symbol
> > __imp__Disa
> > bleThreadLibraryCalls@4
> > blib\arch\auto\DBI\DBI.dll : fatal error LNK1120: 4 unresolved externals
> >
> > NMAKE : fatal error U1077: 'link' : return code '0x19'
> > Stop.
------------------------------
Date: 10 Jun 1999 14:10:19 -0400
From: Scott Gifford <sgifford@tir.com>
Subject: Re: Perl script to purge old messages in mailboxes ?
Message-Id: <m3r9nkylis.fsf@sgifford.tir.com>
Look for the modules Mail::Internet and Date::Parse on CPAN
(cpan.perl.org). They'll do about 90% of the work for you.
------Scott.
Gildas PERROT <perrot@francenet.fr> writes:
> Hi,
>
> I am looking for a script which is able to first warn the user that
> some messages are too old.
>
> Thanks in advance for your help. Gildas.
> --
> Gildas PERROT, perrot@francenet.fr __o
> FranceNet, 28 rue Desaix, 75015 Paris ---_ \<,_
> http://www.francenet.fr ---- (_)/ (_)
------------------------------
Date: Thu, 10 Jun 1999 17:11:06 GMT
From: jatgirl@yahoo.com
Subject: Perl String , RE 's
Message-Id: <7jorj0$nee$1@nnrp1.deja.com>
I have following expression that I need to manipulate in a Cgi/perl
script. Cgi script receives following format from a web based form
LastName, firstName, NickName, Email LastName,FirstName,Nickname,Email
LastName, FirstName,Nickname LastName,FirstName, Nickname, Email
and I need to convert all this to in following format, in order to
process entire data.
LastName FirstName NickName Email
LastName FirstName NickName Email
LastName FirstName NickName
LastName FirstName NickName Email
LastName FirstName
Any idea on how this goal can be achieved, I tried doing following
my $input = @_; #@_ is form data
@array = split /\s+\ $input;
%hash = map {split /,/ } @array;
foreach $key(keys %hash)
{
print " $key $hash{$key} \n";
}
The problem is that, this only prints
LastName FirstName
NickName Email
LastName FirstName
NickName
Any idea how I can achieve my original goal. Your help would be greatly
appreciated.
Thanks
J
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 10 Jun 1999 14:48:16 -0400
From: Kiriakos Georgiou <kgnews@olympiakos.com>
Subject: quiz for perl professionals
Message-Id: <86pv336gen.fsf@dev-serv.nrl.navy.mil>
You may not believe it, but so far out of the interviewees that claimed to
be experienced with perl, none has been able to answer my #1 killer
question: "How do you find the length of an array?"
I figured if the readers of this news group can't get the length of an
array there isn't much hope. Anyway, I include a list of questions - if
you can answer them and you enjoy working with HTML, CGI.pm, DBI (talking
to sybase), etc., I would like to talk to you. The job is in Washington DC.
regards,
Kiriakos
How do you find the length of an array?
In the context of regular expressions, what does \S+ stand for ?
How would you count the number of words in a string?
(split it and use scalar context on the array)
What does 'eval' do?
Why wouldn't you want to put an eval in a loop?
How would you get around the problem in the previous question?
What will $_ = eval 'sub { print @_; }'; print?
what does it do?
what will &$_(1,2,3); do?
What is the difference between 'local' and 'my'?
How do you pass parameters by value?
How do you pass parameters by reference?
Can you describe what the taint mode does? Can you name of any ways for
untainting tainted data?
------------------------------
Date: Thu, 10 Jun 1999 21:02:30 +0200
From: Ondrej Palkovsky <xpalo03@vse.cz>
Subject: Re: Regular Expresion
Message-Id: <37600BC6.636D0B11@vse.cz>
Tad McClellan wrote:
> : This should work:
> : $_ =~ s#/(.*/[^/]*)$#\/$1#g;
>
> You should try out code before you post it for folks to
> learn from...
I did, but posted accidentaly something from other part of screen.
I'll be more carefule next time...
Ondrej Palkovsky
------------------------------
Date: Thu, 10 Jun 1999 19:22:03 GMT
From: alany@2021.com (Alan Young)
Subject: Requesting help in optimizing
Message-Id: <37620f2f.73501531@news.supernews.com>
Hello!
I need some help in optimizing a bit of code.
I have a file with the following format:
# first hash on line is a comment and will be ignored
# ignored, also blank lines will be ignored
[section]
line1
line2
line3
additional
lines
here
[another section]
line1
line2
line3
.
.
.
The format is not under my control, but lines 1, 2 and 3 are (assumed)
always the same type and are to be placed in specific variables. I
have come up with the following code, but I'm sure I can do this in
less space.
Can anyone help me?
Thanks.
Code follows:
#!/u/alany/bin/perl -Tw
use strict;
use vars qw($line1 $line2 $line3);
use IO;
my $fh = new IO::File "<tst.fil";
die "Couldn't open tst.fil" if ! defined $fh;
while (<$fh>) {
# Strip leading/trailing whitespace and anything after a hash mark
s/^\s*(\S.*\S)\s*#.*$/$1/g;
# Condense whitespace to one space between words
s/\s+/ /g;
# For some reason we end up with a blank at the end of the line,
# strip it
s/^(.*)\s$/$1/g;
# Skip blank lines and comment lines
next if /^#/ || /^$/ || /^ $/;
# Check for start of section
if (/^\[(.*)\]$/) {
# Save off the section name
my $secname = lc($1);
print "=================\n$secname\n";
# Grab the next three lines, ignoring blank lines and comments
for (my $i = 0; $i < 3; $i++) {
$_ = <$fh>;
s/^\s*(\S.*\S)\s*#.*$/$1/g;
s/\s+/ /g;
s/^(.*)\s$/$1/g;
while (/^#/ || /^$/ || /^ $/) {
$_ = <$fh>;
s/^\s*(\S.*\S)\s*#.*$/$1/g;
s/\s+/ /g;
s/^(.*)\s$/$1/g;
}
do {$line1 = $_; print "$line1\n";} if $i == 0;
do {$line2 = $_; print "$line2\n";} if $i == 1;
do {$line3 = $_; print "$line3\n";} if $i == 2;
}
}
# Process the remaining lines of the section
}
Alan
------------------------------
Date: Thu, 10 Jun 1999 10:03:37 -0800
From: Ashish Kadakia <anonymous@web.remarq.com>
Subject: Require "No NT commands" on UNIX
Message-Id: <929037819.19863@www.remarq.com>
I have following setup.
Web Server running on NT
CGI Directory is on Unix, as Mapped network drive on NT.
ie..when I call CGI script it looks on UNIX box via mapped
drive on NT.
(my url reads http://www.mysite.com/cgi-bin/xyz.pl)
In CGI script when I call
open IN, "date|" it reads date command of NT and not unix.
(You can tell the difference between NT-date and UNIX-date).
How I can setup in CGI scripts or Perl Enviornment so that
it will not go to NT for commands and read UNIX commands as
I want to try several commands which are on UNIX and not on
NT.
Thanks in advance.
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Thu, 10 Jun 1999 17:35:02 GMT
From: jhagerty@my-deja.com
Subject: Search and replace
Message-Id: <7jot06$o1u$1@nnrp1.deja.com>
Sorry for the newbie but I can't get something figured out. I want to
do a search and replace on a text file. More accurately I want to trim
out a bunch if lines. Here's a sample
First Joe
Last Hagerty
Server Temp_FS
I want to make both of those lines go away. I'd like to find First and
delete until Server to end up with:
Server Temp_FS
Is there a way to make s/ / / do this?
Thanks a ton!!!!
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 10 Jun 1999 10:46:32 -0500
From: "Charlene Abrams" <caa@strata-group.com>
Subject: Sockets problem: solution and question
Message-Id: <7jom6m$167$1@newsin-1.starnet.net>
I was having a problem connecting a perl client to a C server (the client
was reading in extra characters - blanks - and if multiple clients attempted
to send messages, some would get lost, just never get to the server), and it
turned out that if I used sysread and syswrite instead of recv or read, and
send, respectively, all my problems became history. I don't know whether
read, recv and send are buggy and I don't have fixes, or whether I was using
them inappropriately, but I'm glad that I managed to solve my problem - or s
it seems.
My question now concerns sysread and syswrite. In the camel book, it says
"You should be prepared to handle the problems (like interrupted system
calls) that standard I/O normally handles for you". What exactly does this
mean/imply? How can I tell if, for example, there has been an interripted
system call, and what should I do about it? I've searched the FAQs and can't
find anything further on this.
We all know that it's well-nigh impossible to create a test environment in
which every single possible thing that could go wrong, does, although of
course it's a good idea to *try*, but even so, I'm unsure as to how I'd even
cause the problems that I should be handling, let alone figure out how to
handle them.
Any and all pointers appreciated.
Charlene Abrams
Strata Group, Earth City, Missouri
caa@strata-group.com
------------------------------
Date: 11 Jun 1999 09:45:37 GMT
From: hasant@trabas.co.id (Hasanuddin Tamir)
Subject: Re: Using CGI.pm
Message-Id: <slrn7lvj1h.8dp.hasant@borg.intern.trabas.co.id>
On Thu, 10 Jun 1999 10:42:08 GMT, Sitaram Chamarty <sitaram@diac.com> wrote:
> On Wed, 09 Jun 1999 05:13:20 GMT, R.Joseph <streaking_pyro@my-deja.com> wrote:
> >I have been writing CGI for a couple of months, and the instructor in
> >my class always used CGI-LIB.pl by Steven Brenner. However, I keep
> >hearing more and more about this CGI.pm module. Is there someone who
> >can explain it's differences from CGI-LIB.pl and if it is better than
> >CGI-LIB.pl or not? Any help is much appreciated. Thanks.
>
> Never used CGI-LIB.pl (case?). CGI.pm is the preferred way to do
> CGI programming in Perl. I believe the .pl version pertains to
> Perl 4.
AFAIK, the last version of cgi-lib.pl claims to follow
Perl5, but somewhat its style still refers to v4. I
personally prefer to stick with CGI.pm
The difference between them? CGI.pm does what cgi-lib.pl does,
even much better, but not vice versa.
-hasan-
uhm, no more sig(h)
------------------------------
Date: Thu, 10 Jun 1999 16:00:32 GMT
From: John Porter <jdporter@min.net>
Subject: Re: What's the "halting problem"?
Message-Id: <7jonep$ljr$1@nnrp1.deja.com>
In article <m11zfk43jz.fsf@halfdome.holdit.com>,
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
> It's too bad we can't prove that Y2K == Halting Problem.
I think we can. Consider that if you only check a program for
Y2K cleanness to some arbitrary limit of iterations/recursions (N),
then it might perform a wicked deed on iter/recur N+1.
(Of course, that's assuming you check a program dynamically rather
statically in the first place, which I don't think many people are
doing...)
On the other hand, if the program doesn't halt before 01/01/00,
you kinda don't care whether you test the program all the way
to the halting point. last if &millenium.
--
John Porter
Put it on a plate, son. You'll enjoy it more.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
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 5951
**************************************