[7372] in Perl-Users-Digest
Perl-Users Digest, Issue: 997 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 8 18:07:46 1997
Date: Mon, 8 Sep 97 15:00:49 -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 Mon, 8 Sep 1997 Volume: 8 Number: 997
Today's topics:
Re: </.*?> vs. </[^>]*> <kshaw@plight.lbin.com>
AddINC module, were is it? <zenin@best.com>
Automation of tip sessions with perl (Dwalu Khasu)
Re: Beginner's question : Perl or Java ? (Bart Lateur)
Re: Beginner's question : Perl or Java ? (brian d foy)
Chicago Area Job Opening... <roger@mantamedia.com>
Re: Doubling up a character in a string (John Dallman)
Re: Doubling up a character in a string (Colin Kuskie)
Re: Erase line when using print (progres meter) (susan cassidy)
Re: flock() time (Charles DeRykus)
Re: Getting rid of \n in textarea input rets@meta3.com
Re: Help! How to make http request from perl CGI? <bosch@goweb.lu>
Re: Help! How to make http request from perl CGI? (brian d foy)
Re: Here Document with FILEHANDLE (Charles DeRykus)
Re: HTML Table to Array (Bart Lateur)
Hunh? Why DOES this work??? <eryq@harp.gsfc.nasa.gov>
Learn programming in Python at the Python Conference <guido@eric.cnri.reston.va.us>
Re: Minimizing Memory Needed for Numbers Read from Bina (Jason Gloudon)
perl(net::ftp) on NT3.51 david.griffin@prudential.com
Re: regex problems (Tom Grydeland)
Re: Slogans (Was Re: perl and XEmacs) <cadet@mit.edu>
Syntax of SEARCHLIST in tr? <flavell@mail.cern.ch>
What does "regexp *+ operand could be empty" mean? <Brett.W.Denner@lmtas.lmco.com>
Re: where's gunzip and tar for dos/win? (Jason Gloudon)
www.perl.com <dustin@songline.com>
www.perl.com (Dustin Mollo)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 08 Sep 1997 13:39:58 -0700
From: kendall shaw <kshaw@plight.lbin.com>
Subject: Re: </.*?> vs. </[^>]*>
Message-Id: <52u3fv35gh.fsf@plight.lbin.com>
tadmc@flash.net (Tad McClellan) writes:
> kendall shaw (kshaw@plight.lbin.com) wrote:
> : Duhhh. How come </.*?> doesn't do what I thought it did?
>
> I dunno.
>
> Would you care to share with us what you thought it did?
>
> What *is* it anyway?
>
> A glob?
>
> A regex?
Sheesh!
Well, I'm failing to repeat the problem. I probly just messed
something up, but let me ask a question instead:
Is there ever a difference between the regular expressions: </.*?> and
</[^>]*>?
------------------------------
Date: 8 Sep 1997 19:50:55 GMT
From: Zenin <zenin@best.com>
Subject: AddINC module, were is it?
Message-Id: <5v1kuv$925$1@nntp2.ba.best.com>
The Great Blue Camel speaks of a module by the name of AddINC (Top of
page 459), which has the power to add the directory of the executing
program to your INC so that modules built just for that application can
be left in the same directory and still be found.
I can not, for the life of me find any such module, or any reference to it
out side of this one. I've manually walked all over CPAN, as well as have
done a few searches for "INC" using the CPAN search utilitys.
Anyone know if this module actually exists and were I can find a copy? Or
do I have to write it myself?
Thanks!
--
-Zenin
zenin@best.com
------------------------------
Date: 08 Sep 1997 17:13:15 -0400
From: dwalu@csa.bu.edu (Dwalu Khasu)
Subject: Automation of tip sessions with perl
Message-Id: <wvkk9gr7bmc.fsf@csa.bu.edu>
Hi,
My goal is to automate configuration and testing of certain network equipment
using tip and perl. I think I'm pretty close except I keep getting:
"tip: must be interactive"..."Use of uninitialized value....Broken pipe.
I'm using IPC::Open2 for a two-way stream effect and FileHandle. I'm not
quite sure what's happening but as soon as I try to write to the process, I
get 'Broken pipe' and the program exits. Can someone familiar with tip
interactions point the way...here's the code sample:
- Dwalu
-----
$rdr = new FileHandle;
$wtr = new FileHandle;
my $pid = open2($rdr, $wtr, $tipcmd) or die "$0: Can't do open2\n";
print "pid=$pid\n";
my $res = '';
print "Connected to $DeviceName on $Hostname using $ConfigFile\n" if $opt_v;
print $wtr "\cC\n";
print $wtr "\cM\n";
print $wtr "canc-user;\n";
$res = <$rdr>;
print $res unless !$res;
----Here's my previous test example using 'bc' that worked...
#!/usr/bin/perl -w
use strict;
use FileHandle;
use vars qw /$wtr $rdr/;
use IPC::Open2;
my (@maths) = qw/4+32 1997-1971 1997-1943/;
$rdr = new FileHandle;
$wtr = new FileHandle;
my $pid = open2($rdr, $wtr, 'bc') or die "$0: Can't do open2\n";
print "pid=$pid\n";
my $res;
foreach (@maths) {
print $wtr "$_\n";
$res = <$rdr>;
print "Wrote '$_' and got: '$res'";
}
print $wtr "quit\n";
print "...exiting...\n";
$rdr->close;
$wtr->close;
--
I am an important person in this world -
Now is the most important time in my life -
My mistakes are my best teachers -
So I will be fearless.
- Student Creed
------------------------------
Date: Mon, 08 Sep 1997 20:44:31 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Beginner's question : Perl or Java ?
Message-Id: <3416fa6a.2078526@news.tornado.be>
roy@unice.fr wrote:
[program specifications snipped]
>Is the Perl program *much* simpler than the corresponding Java one, or are they
>about the same size ?
I don't know if this is an important question. But you seem to be
unaware of a very important distinction between Perl and Java:
* Perl runs on the web server
* Java runs on the client's computer
If you want to prepare a html file for processing by a program in
Scheme, and Scheme runs on the server, well, this rules Java out.
HTH,
Bart.
------------------------------
Date: Mon, 08 Sep 1997 17:16:16 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Beginner's question : Perl or Java ?
Message-Id: <comdog-ya02408000R0809971716160001@news.panix.com>
In article <3416fa6a.2078526@news.tornado.be>, bart.mediamind@tornado.be (Bart Lateur) wrote:
>roy@unice.fr wrote:
>
>[program specifications snipped]
>
>>Is the Perl program *much* simpler than the corresponding Java one, or are they
>>about the same size ?
>
>I don't know if this is an important question.
sure it's an important question, especaiily for the task he mentioned. Perl
wins out for rapid development in this case.
>But you seem to be
>unaware of a very important distinction between Perl and Java:
>
> * Perl runs on the web server
> * Java runs on the client's computer
Java might run on the client's computer as an applet, but that is not a
requirement. Java is a lot more than just applets.
--
brian d foy <comdog@computerdog.com>
------------------------------
Date: Mon, 08 Sep 1997 14:33:18 -0400
From: Roger Vernon <roger@mantamedia.com>
Subject: Chicago Area Job Opening...
Message-Id: <341444EE.FF6@mantamedia.com>
Ok, I know I'll probably get flamed for posting this in this particular
group, but I would really like to fill this position.
We're a small (but growing... really!) multimedia/Internet/Intranet
development company. We're looking to hire someone who has two-three
years experience working with C/C++ or Perl or Java or any combination
thereof. Obviously any web development or intranet experience would be
a great plus. Any Oracle (OraPerl) or other database experience would
be helpful. You must live in the Chicago area and you must like working
in a very casual and cool environment.
We are not looking for someone who has had a lot of management
experience. We are currently management heavy. That's not to say that
you couldn't move into such a position someday in the future. We just
are not looking for someone who is expecting to be managing right out of
the box. We're also not looking for someone with twenty years of
experience. We pay competitively but we can't afford you if you've been
in this industry since I was in diapers.
If you're in the Chicago area and have some of the above experience and
the job sounds interesting, send us a resume. - roger@mantamedia.com
You can check out our web-site to see some of the stuff we do -
www.mantamedia.com
Thanks.
------------------------------
Date: 8 Sep 1997 21:14:35 GMT
From: jgd@cix.co.uk (John Dallman)
Subject: Re: Doubling up a character in a string
Message-Id: <memo.19970908220802.15631A@jgd.compulink.co.uk>
In article <5v12bf$dhq$1@ns2.ny.ubs.com>, nysfe@ny.ubs.com (Salvatore
Sferrazza) wrote:
> I am looking for a generic routine to which I can pass a character
> as an argument and have the routine search the string for that
> character, and then double it, i.e I have a string such as:
> provided that I pass it a ' as an argument. I was looking into using
> substitution with s//, but I heard that will only give me back:
>
> "Bob's wife is married to Mike''s cousin."
>
> because it performs greedy matching.
I don't think the greedy matching matters here. This should work:
sub double_double
{
local( $c, $s) = @_;
$s =~ s/$c/$c$c/g;
$s; # return the modified string
}
---
John Dallman, jgd@cix.co.uk. A micro-FAQ on things I keep getting asked:
#!perl is at ftp://.../CPAN/ports/msdos/tips-tricks/hbp_403.zip, Perl for
NT/Win 95 can be found at http://www.activeware.com, with an excellent FAQ
file at http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html
and no, I don't have the slightest idea what's wrong with your CGI script.
Try http://www.perl.com/perl/faq/idiots-guide.html
------------------------------
Date: 8 Sep 1997 13:10:38 -0700
From: colink@latticesemi.com (Colin Kuskie)
Subject: Re: Doubling up a character in a string
Message-Id: <5v1m3u$odf@sarek.latticesemi.com>
In article <5v12bf$dhq$1@ns2.ny.ubs.com>,
Salvatore Sferrazza <salvatore.sferrazza@ubs.com> wrote:
>provided that I pass it a ' as an argument. I was looking into using
>substitution with s//, but I heard that will only give me back:
>
>"Bob's wife is married to Mike''s cousin."
>
>because it performs greedy matching.
Well s/// does do greedy matching if you ask it to, but since you only
want one character, you don't have to worry about it:
Try this:
$a =~ s/($char)/$1$1/g;
Or, you could do something like this:
while (($pos = index($a, $char, $pos)) >= 0) {
substr($a, $pos++, 0) = $char;
++$pos; ##To get beyond this character and avoid the infinite loop.
}
Now you can argue the merits of substr vs s/// for speed and overhead.
Since s/$anyvar// has to be continuously recompiled each time it's run,
it should be considered slower, but from a code readability point of
view, it is a lot clearer. Of course, like all good programmers, you
document you code thoroughly :) so it really doesn't matter (and so on
and so on...)
No matter which approach you choose, it sounds like you need to learn
more about regular expressions. You could try Jeff Friedl's book, or
the Camel, or the Llama, or you could read the perl man pages.
To meta-quote Randal Schwartz:
"Use regular expressions. Regular expressions are your friend"
Colin Kuskie
------------------------------
Date: 8 Sep 1997 12:26:22 -0700
From: susanc@news.SanDiegoCA.ncr.COM (susan cassidy)
Subject: Re: Erase line when using print (progres meter)
Message-Id: <5v1jgu$ldt@ssd3450.SanDiegoCA.NCR.COM>
Keywords: erase erasing line using print printf progres meter
In article <5ultov$j3d@imol2.vub.ac.be>,
DeJean <jan.doumen@imol.vub.ac.be_cut_this_> wrote:
>Hi,
>
>I would like to have a kind of progress meter for perl
>I'm printing info to the screen like
>
> doing 1 of 10
> doing 2 of 10
> ...
>
>This doesn't look nice when you are doing 729 items. There for I would
>like the second line to overwrite the first one. Anybody around who
>can help with this? I tried numerous things and none fo them seems to
>work e.g.
>
> print "Erase line ...";
> for($i=0;$i<=100000;$i++) {
> }
> print "... now";
>
>prints both items at the same time. (No explicit clearing of buffer)
>
> print "Erase line ...";
> for($i=0;$i<=100000;$i++) {
> }
> print "\015... now";
>
>same problem
>
>--
>DeJean http://ultr.vub.ac.be/~jan
If you are on a unix box, it might be extra overhead, but you can
just put in a system call to "tput cup row column", where row is
the row number on the screen, and column is the column number,
before you output the text.
This will position the cursor to a specific spot on the screen.
Example:
#!/usr/bin/perl
system("clear");
for ($i=0; $i<25;$i++){
system ("tput cup 8 1");
print "line $i\n";
}
--
Susan Cassidy
email: susan.cassidy@sandiegoca.ncr.com
------------------------------
Date: Mon, 8 Sep 1997 17:29:08 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: flock() time
Message-Id: <EG79wL.AHs@bcstec.ca.boeing.com>
In article <8cn2lo8mik.fsf@gadget.cscaper.com>,
Randal Schwartz <merlyn@stonehenge.com> wrote:
>>>>>> "Charles" == Charles DeRykus <ced@bcstec.ca.boeing.com> writes:
>
> Charles> raise an exception, e.g.,
>
> Charles> $SIG{ALRM} = sub { die "expired" };
> Charles> alarm(60);
> Charles> eval { flock() };
> Charles> alarm(0);
> Charles> if ($@ =~ /^expired/) {
> Charles> ...
> Charles> elsif ($@) {
> Charles> ...
>
> actually, this'd be cooler and safer:
>
> eval {
> local $SIG{__DIE__} = 'DEFAULT';
> local $SIG{ALRM} = sub { die "expired" };
> alarm(60);
> #thing that might take time or not
> };
> alarm(0);
> if ($@ =~ /^expired/) { ... }
>
> I'm probably still overlooking something, but that's a closer cut
> than yours.
Don't look back - paranoia may be gaining on ya :)
P.S. - much cooler solution though.
--
Charles DeRykus
------------------------------
Date: Mon, 08 Sep 1997 14:12:16 -0600
From: rets@meta3.com
To: rets@meta3.com
Subject: Re: Getting rid of \n in textarea input
Message-Id: <873745680.18598@dejanews.com>
In article <341385B8.41B65329@backroompr.com>,
info@backroompr.com wrote:
> I need to know how to get rid of carriage returns put in by users in
> textarea so I can put it in one continuous line in my database file.
>
> I tried
>
> $FORM{'information'} =~ s/\n/ /g;
Try this...
$form = $FORM{'information'};
$cr = pack("C*", 13, 10);
$form =~ s/$cr/ /g;
print $form, "\n";
This should take care of it.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Mon, 08 Sep 1997 22:34:43 +0200
From: Bosch Patrick <bosch@goweb.lu>
To: mgwong@cedar.ca.gov
Subject: Re: Help! How to make http request from perl CGI?
Message-Id: <3414615C.9156E69B@goweb.lu>
Mike Wong wrote:
> I'd like to know how to write a perl CGI script that would make an
> http request for an html document, do some stuff to the document, and
> then push the results to the browser.
>
> Writing a CGI doesn't trip me at all--but making the http
> request--that's the trick. If anyone can help me, I'd greatly
> appreciate
> the knowledge.
>
> Thanks in advance!
>
> - mike
You can take a look at the very good book CGI Programming witten by
Shishir Gundavaram at O'Reilley & Associates, Inc.
(http://www.oreilly.com), US$ 29.95. There is a chapter dedicated to
checking heyptertext links. You can get the perl script sockets.pl,
written for socket connections and others at
ftp://ftp.ora.com/published/oreilly/nutshell/cgi . In your script you
have to add:
require "sockets.pl";
and something like
&open_connection (HTTP, $server, http);
HTTP is now a filehandle open for writing and reading. Now you have to
say something like this to the server:
print HTTP "GET /index.html HTTP/1.0\n\n";
and read the output through the <HTTP> filedhandle.
Hope this helps
Patrick
------------------------------
Date: Mon, 08 Sep 1997 17:19:59 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Help! How to make http request from perl CGI?
Message-Id: <comdog-ya02408000R0809971719590001@news.panix.com>
In article <3414615C.9156E69B@goweb.lu>, bosch@goweb.lu wrote:
>Mike Wong wrote:
>
>> I'd like to know how to write a perl CGI script that would make an
>> http request for an html document, do some stuff to the document, and
>> then push the results to the browser.
>>
>> Writing a CGI doesn't trip me at all--but making the http
>> request--that's the trick. If anyone can help me, I'd greatly
>> appreciate
>> the knowledge.
>>
>> Thanks in advance!
>>
>> - mike
>
>You can take a look at the very good book CGI Programming witten by
>Shishir Gundavaram at O'Reilley & Associates, Inc.
>require "sockets.pl";
danger will robinson!
that stuff is dated and there are new and improved ways to do that,
like using the LWP module [1], with techniques from the Pelican book [2].
[1] at a Comprehensive Perl Archive Network
find one near you at <URL:http://www.perl.com>
[2]
Web Client Programming with Perl
Clinton Wong
ISBN 1-56592-214-X
<URL:http://www.ora.com>
--
brian d foy <comdog@computerdog.com>
------------------------------
Date: Mon, 8 Sep 1997 17:20:47 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Here Document with FILEHANDLE
Message-Id: <EG79Io.9p9@bcstec.ca.boeing.com>
In article <5u5ln4$4lq@bgtnsc03.worldnet.att.net>,
Jerry Xia <jxia@worldnet.att.net> wrote:
>
> Is there any way that I can open a file with using here document? What I am
> trying to do is something like:
>
> open (FTP, "ftp -n $hostname <<EOF
> user xxx
> ls -l
> ...
> bye
> EOF
> "|);
>
> But it is not working. I tried to put "|" after first EOF. It didn't work
> either. I can get over this by using a file which contains ftp commands:
>
> open (FTP, "ftp -n $hostname < $filename |");
>
> Since I can use here document in Shell script, I am wondering that there
> may be a way to do this in Perl.
>
Easier to use Net::FTP as someone already noted.
However, the problem appears to be your final "| which is
reversed. This'll work for anonymous ftp for example:
open(FTP, "ftp -n $hostname <<EOF
user anonymous me\@here.com
ls -l
bye
EOF
|") or die $!;
Be sure there're no trailing spaces after the EOF.
HTH,
--
Charles DeRykus
------------------------------
Date: Mon, 08 Sep 1997 20:44:27 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: HTML Table to Array
Message-Id: <3415f7e9.1438046@news.tornado.be>
Kenneth LO <kenlo@hk.super.net> wrote:
>#assume you want to parse the HTML table in $c
>$c=~s/^M//gi; #remove dos ^M, if any
>$c=~s/\n//gi; #remove potential misplaced newline
You might try a single tr/// statement instead:
$c=~tr/\r\n//d;
>$c=~s/<\/TD>/<\/TD>\n/gi; #force a newline at each field
>@r = ($c=~/<TD>.*<\/TD>/g); #separate the fields into array @r
...
>I don't know how to generalise the operation with table fields. Some
>HTML pages use lower case </td><td> pairs. Some have formatting codes in
>the pairs like <td align=right><font size=-1>. I need to customise the
>parser for different pages.
You can do case insensitive searching by using the "i" option. Search
for td by using the "\b" word boundary:
@r = ($c=~/<TD\b[^>]*>.*<\/TD>/gi);
I reallly ought to test this before posting... But you get the idea, I
think.
You can strip the formatting tags afterwards.
Bart.
------------------------------
Date: Mon, 08 Sep 1997 17:07:29 -0400
From: Eryq <eryq@harp.gsfc.nasa.gov>
Subject: Hunh? Why DOES this work???
Message-Id: <34146911.24603835@harp.gsfc.nasa.gov>
Okay, I'm going a little nuts here... I would have
thought the following would be a syntax error,
but 5.002 and 5.004 like it just fine:
%ssn = (Fred => 101,
Sue => 102,
George => 103);
$name = 'Sue';
print %ssn->{$name}, "\n";
See what I mean with that %ssn->{$name} jazz? I mean,
I know it's SUPPOSED to be $ssn{$name}... so why is
the above code legal?
Eryq.
------------------------------
Date: 08 Sep 1997 16:02:44 -0400
From: Guido van Rossum <guido@eric.cnri.reston.va.us>
Subject: Learn programming in Python at the Python Conference
Message-Id: <5lvi0bmv4r.fsf@eric.cnri.reston.va.us>
Python is one of the most versatile interpreted programming languages
around. It is available for all major platforms (Windows, Mac and
Unix), and is completely free, including all source code(!). Python
has its own web site:
http://www.python.org
Python is object-oriented by design, and is easy to learn, even for
non-expert programmers. It is also very readable -- some people use
it as executable pseudo code!
Python is usable for every programming task: from writing CGI or
sysadmin scripts, via rapid prototyping of distributed systems, to
full-fledged GUI-based applications. It can be linked to other
languages, and wrappers are available (or easily constructed!) to
connect it to databases, scientific and numerical code, engineering
applications, rendering libraries, you name it. On Windows, it talks
COM/DCOM and ActiveX; on the Mac, it talks AppleScript. Using Xerox
PARC's ILU, it talks CORBA.
In October this year, a unique opportunity exists to learn Python from
the experts: by coming to the Sixth International Python Conference,
held October 14-17. The first day is devoted to tutorials for both
beginners and experts; the rest of the conference will be an
entertaining mixture of presentations, panels and discussions.
If you register by Friday September 12, you save $50 on registration!
For the full conference program and registration info, see:
http://www.python.org/workshops/1997-10/
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
------------------------------
Date: 8 Sep 1997 21:27:42 GMT
From: jgloudon@bbn.com (Jason Gloudon)
Subject: Re: Minimizing Memory Needed for Numbers Read from Binary Files
Message-Id: <5v1qke$mh6$1@daily.bbnplanet.com>
In article <34140DDF.41C6@lmtas.lmco.com>,
Brett Denner <Brett.W.Denner@lmtas.lmco.com> wrote:
>I tried each of the following methods for loading @array, and have
>listed estimates of the maximum memory used by Perl for each:
>
> $array[$j][$i] = '3.1415927'; # 234 Mb
> $array[$j][$i] = 1; # 80 Mb
> $array[$j][$i] = $PI; # 184 Mb
> $array[$j][$i] = unpack "f", $string; # 96 Mb
>
>Note that in the latter three cases, I am essentially assigning a
>floating
>point number (4 bytes on my IRIX) to a 2000 x 2000 array, which requires
>a
>minimum of 4 * 2000 * 2000 = 16_000_000 bytes of storage. These three
>methods, however, require 5 to 12 times as much memory to store the
>array
>as would seem to be necessary.
>
>That seems like a lot of overhead, but maybe its necessary because
>of the inner workings of Perl. Does anyone have any thoughts?
>
>Thanks,
>Brett
The "overhead" in terms of memory utilization is the natural consequence of
the implementation of multidimensional arrays and other data structures
using arrays (linked lists) of references (pointers).
I don't think it would be unreasonable to guess that if you wanted to process a
multidimensional array of "floats" the size you quoted, and were concerned
about memory and/or speed, that maybe you wouldn't want to do it in Perl.
It might be a different matter if that were an array of strings.
Jason Gloudon
------------------------------
Date: Mon, 08 Sep 1997 15:51:38 -0600
From: david.griffin@prudential.com
To: dgriffin@gti.net
Subject: perl(net::ftp) on NT3.51
Message-Id: <873751300.25392@dejanews.com>
Does anyone know of problems, or actually successes, using the NET::FTP
package on the NT port of perl? I find that it works beautifully for
getting one file but if you issue multiple get()'s within your perl
script, the files do come but when you try to close() the connection
it hangs in the close(). I have tried it both within one connection
and have tried closing the connection and reopenning it within the script
without success. When running with the -w switch I get the following
diagnostic messaeges which make me suspect the port:
No such signal: SIGALRM at C:\usr\perl\lib/IO/Socket.pm line 206.
No such signal: SIGALRM at C:\usr\perl\lib/IO/Socket.pm line 206.
No such signal: SIGALRM at C:\usr\perl\lib/IO/Socket.pm line 571.
Any ideas would be appreciated.
Thanks
dave
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 8 Sep 1997 19:39:23 GMT
From: tom@mitra.phys.uit.no (Tom Grydeland)
Subject: Re: regex problems
Message-Id: <slrn618l3b.qhn.tom@mitra.phys.uit.no>
In article <5v1g8t$lps$1@news.gate.net>, David Siebert wrote:
>how can a replace any amount of whitespace follwed by a ; with just a ;.
s/\s+(?=;)//g;
For an explanation, try man perlre
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 08 Sep 1997 12:47:58 -0400
From: David Bakhash <cadet@mit.edu>
Subject: Re: Slogans (Was Re: perl and XEmacs)
Message-Id: <c29iuwbiwg1.fsf@ten-thousand-dollar-bill.MIT.EDU>
michael@flash.net (Michael W Peterson) writes:
> On Tue, 02 Sep 1997 17:17:09 -0400, Chris Nandor <pudge@pobox.com> wrote:
>
> [huge snip of Chris's excellent article]
>
> >I argue that Perl's syntax is the most powerful of all the programming
> >languages, and that is in part BECAUSE it mirrors the way we think and
> >gives us the power to write crappy code.
code should be viewed on many levels. A definate one is the ability to
churn out quick, efficient code fast, that does the job, and does it
well. There is no doubt that Perl has a very powerful set of libs that
are written well, and are relatively fast. If you have become part of
the Perl thing by months of pain learning the most evil syntax, to the
point where you start to believe that you always thought in such a
non-linear way, then you're good for Perl. You can write kick-ass
scripts fast. I have been indoctrinated by the Perl frenzy myself,
having had CGI scripting jobs. But That's not all there is to
programming. There's readability. Perl is, to say the least, difficult
to debug if you don't know the complexities and intricacies of the
language. If you're staring at something someone else wrote (or even
something that you wrote a few months back), you can easily get
confused. Lisp can even get this way for me -- esp. for huge code. But
what saves Perl (or *can* save it) is that it can be well-written.
Also, since it's interpreted and high-level, lots of ugly stuff is done
internally. There is potential for nice Perl code, though most people
don't try. I don't try too hard myself.
Put simply, Perl is not for everyone. it's for people who are
willing to put up with irregularity for the sake of power and
flexibility. For me, though, the time it would take to write well
commented Perl code is about the same as uncommented Lisp. But Lisp to
me is self-commenting. So which one is better? I don't know. They
both rule. but for any huge code, please don't even *think* about using
Perl. I don't care about the modules, the OO abilities, the Perl V
references. But for any scripting, it's ideal. csh is no better (much
worse to me) and so is sh. If you are a shell-script person, then
abandon everythign but Perl. (IMO)
------------------------------
Date: Mon, 8 Sep 1997 20:31:27 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Syntax of SEARCHLIST in tr?
Message-Id: <Pine.A41.3.95a.970908220930.111812P-100000@sp065>
I'm finding the perlop section about the syntax of the tr searchlist is
somewhat vague. Are there any characters that have a special meaning in
this context? From the examples it seems "yes", since "-" at least is
playing a special role in "a-z" etc. OK, then how does one specify a
"-" literally in such a list? And what other characters, if any,
play a special role and how does one escape them? This isn't "regular
expression" syntax, is it? Where have I failed to find it documented?
Perl is usually so good about documenting things, but I only realised I
hadn't understood this when I tried to use tr in some ways that I
hadn't done before.
OK, let's take one specific example: to filter an arbitrary string
leaving only alphabetic characters and hyphens. Is it tr/a-zA-Z-//cd
or what? That seems to work, but...
------------------------------
Date: Mon, 08 Sep 1997 16:05:01 -0500
From: Brett Denner <Brett.W.Denner@lmtas.lmco.com>
Subject: What does "regexp *+ operand could be empty" mean?
Message-Id: <3414687D.41C6@lmtas.lmco.com>
I'm trying to match patterns like this:
abc =
abc = 10
abc = 10 20
abc = 10 20 30 (etc.)
When I run this script:
$_ = 'abc = 10 20 30';
s<\b(abc \s* = \s*) (\d* \s*)*><$1 20>x;
I get the following error message:
/(abc = )(\d*\s*,?)*/: regexp *+ operand could be empty at (eval 5)
line 2, <IN> chunk 2.
What does this mean? I've looked in the Camel book, and searched the
perldiag man page, but had no luck. Any ideas?
Thanks,
Brett
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brett W. Denner Lockheed Martin TAS
Brett.W.Denner@lmtas.lmco.com P.O. Box
748
(817) 935-1144 (voice) Fort Worth, TX 76101
(817) 935-1212 (fax) MZ 9333
------------------------------
Date: 8 Sep 1997 20:42:20 GMT
From: jgloudon@bbn.com (Jason Gloudon)
Subject: Re: where's gunzip and tar for dos/win?
Message-Id: <5v1nvc$ihs$1@daily.bbnplanet.com>
In article <5v17gf$f5g$1@soap.uunet.pipex.com>,
Jonathan Tracey <jont@uunet.pipex.com> wrote:
> You can use winzip to undo the files
>
>Its availible form http://www.winzip.com
>
>Hope this helps
>
>Jon
>
>
>stephen wrote in article <01bcbc47$9b16e4c0$60f8aecc@direct.ca.direct.ca>...
>
>>Just downloaded the latest Perl for Windows/DOS,
>>but it's in a gzipped and tar format:
>>
>> perl5_00402-bindist04-bc_tar.gz
>>
>>which utility do I use to gunzip and tar it?
>>
>>thanks
>>stephen
>
>
You may have to rename the file after you unzip it from
perl5_00402-bindist04-bc_tar to perl5_00402-bindist04-bc.tar so winzip will
think it is a tar file.
Jason Gloudon
------------------------------
Date: Mon, 08 Sep 1997 13:29:26 -0700
From: Dustin Mollo <dustin@songline.com>
Subject: www.perl.com
Message-Id: <34146026.3375@songline.com>
Greetings!
Some of you have noticed that www.perl.com has been up and down several
times a couple of weeks ago. Some of you have also noticed that the
site has
undergone a major change.
Announced at the O'Reilly Perl Conference, www.perl.com has a new home.
O'Reilly has made an agreement with Tom Christiansen (of perl.com) and
Clay
Irving (of The Perl Reference) to host both of their sites, as well as
bring
new content and services to the Perl community.
The recent problems with the server where due to bad RAM in the machine
that
is hosting the web sites. After finally tracking down the problem, new
RAM
was installed and the machine has been running smoothly ever since
(knock on
virtual wood).
Tom, Clay and myself are hard at work at re-working the sites to become
more
up to date and more bug free. If you notice something is wrong with the
site or have an idea on an improvement, please feel free to contact me
and
let me know.
--
-Dustin
------------------------------------------------------------------------------
Dustin Mollo Songline
Studios
Site Manager 101 Morris
Street
Sebastopol, Ca.
95472
http://www.perl.com (800) 998-9973
------------------------------------------------------------------------------
Songline Studios is an affiliate of O'Reilly & Associates, Inc.
------------------------------
Date: 8 Sep 1997 20:39:07 GMT
From: dustin@magic.ora.com (Dustin Mollo)
Subject: www.perl.com
Message-Id: <5v1npb$c48$1@ultra.sonic.net>
Greetings!
Some of you have noticed that www.perl.com has been up and down several
times two weeks ago. Some of you have also noticed that the site has
undergone a major change.
Announced at the O'Reilly Perl Conference, www.perl.com has a new home.
O'Reilly has made an agreement with Tom Christiansen (of perl.com) and Clay
Irving (of The Perl Reference) to host both of their sites, as well as bring
new content and services to the Perl community.
The recent problems with the server where due to bad RAM in the machine that
is hosting the web sites. After finally tracking down the problem, new RAM
was installed and the machine has been running smoothly ever since (knock on
virtual wood).
Tom, Clay and myself are hard at work at re-working the sites to become more
up to date and more bug free. If you notice something is wrong with the
site or have an idea on an improvement, please feel free to contact me and
let me know.
--
-Dustin
------------------------------------------------------------------------------
Dustin Mollo Songline Studios
Site Manager 101 Morris Street
Sebastopol, Ca. 95472
http://www.perl.com (800) 998-9973
------------------------------------------------------------------------------
Songline Studios is an affiliate of O'Reilly & Associates, Inc.
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 997
*************************************