[9729] in Perl-Users-Digest
Perl-Users Digest, Issue: 3323 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 3 07:05:22 1998
Date: Mon, 3 Aug 98 04:00:22 -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, 3 Aug 1998 Volume: 8 Number: 3323
Today's topics:
$|=1 caused a program failure on VMS.. (GEMINI)
calling exe <blegge@iafrica.com>
Re: cannot alias $_ in perl 5.005 (Ilya Zakharevich)
Re: CGI, Perl & auto file transfer <kims@tip.net.au>
Re: comp.lang.perl.announce redux <rra@stanford.edu>
Re: comp.lang.perl.announce redux birgitt@my-dejanews.com
Re: comp.lang.perl.announce redux birgitt@my-dejanews.com
connect CGI with MS-Access <info@kptkip.com>
Re: contact problem (Craig Berry)
Re: Cookie File <quednauf@nortel.co.uk>
Re: Copyright question <rick@albrich.demon.co.uk>
Re: Copyright question <alan@find-it.furryferret.uk.com>
Re: dbm tie and file locking <quednauf@nortel.co.uk>
error in running nmake on makefile for my perl extensio erikng@my-dejanews.com
File::Copy and atomicity <jimbo@soundimages.co.uk>
Re: File::Copy and atomicity <rra@stanford.edu>
Re: File::Copy and atomicity (Ilya Zakharevich)
Frustrated In Quebec <sysop97@nospam.callisto.si.usherb.ca>
Re: Frustrated In Quebec (Sam Holden)
Re: hiding user input <rra@stanford.edu>
Re: Interesting Question needs Quick Answer <jimbo@soundimages.co.uk>
Re: IO::Socket problem / alternative? <jimbo@soundimages.co.uk>
Re: Newbie questions...help! (Craig Berry)
Newbie: Perl and Oracle?!? <che@gwent.nhs.gov.uk>
Re: Newbie: Perl and Oracle?!? <webmaster@fccjmail.fccj.cc.fl.us>
Re: Non-Standard Data File <Barney@tdrake.demon.co.uk>
Perl Counter divakarpc@my-dejanews.com
Re: Perl Counter <webmaster@fccjmail.fccj.cc.fl.us>
Re: printed & bound perl 5.005 manuals? <jimbo@soundimages.co.uk>
Re: WANTED: Perl Autoreponder - Any Takers? <wd@uebemc.siemens.de>
Where to get a Perl/Tk for Windows? (Volker Bvhm)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 3 Aug 1998 09:28:58 GMT
From: dennis@info4.csie.nctu.edu.tw (GEMINI)
Subject: $|=1 caused a program failure on VMS..
Message-Id: <6q3vsq$88a$2@netnews.csie.NCTU.edu.tw>
hi there,
I have a perl of version 5.004_04 built for VMS_AXP.
I found that when I used $|=1 with a socket handle,
it will cause an access violation fatal error as follows:
what's the matter with it?
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=00000004, PC
=80586B60, PS=0000001B
Improperly handled condition, image exit forced.
Signal arguments: Number = 00000005
Name = 0000000C
00000000
00000004
80586B60
0000001B
Register dump:
R0 = 0000000000000000 R1 = 0000000000000000 R2 = 000000007F3D4B38
R3 = 0000000000000001 R4 = 00000000001871F0 R5 = 0000000000000000
R6 = 00000000001F948C R7 = 0000000000004000 R8 = 0000000001016007
R9 = 000000007FF9C400 R10 = 000000007FF9D228 R11 = 000000007FFBE3E0
R12 = 0000000000000000 R13 = 000000007EF0A900 R14 = 0000000000000000
R15 = 00000000000003C8 R16 = 00000000001871F0 R17 = 0000000000000000
R18 = 000000000037E000 R19 = 00000000000035C5 R20 = 0000000035C5F346
R21 = FFFFFFFFFFFF7FFE R22 = 82C635C582C635C5 R23 = 82C6000000000000
R24 = 00000000000035C5 R25 = 0000000000000003 R26 = FFFFFFFF80586A1C
R27 = 000000007F3D7370 R28 = FFFFFFFF804643C4 R29 = 000000007EE776B0
SP = 000000007EE776B0 PC = FFFFFFFF80586B60 PS = 300000000000001B
------------------------------
Date: Mon, 3 Aug 1998 11:22:02 +0200
From: "Brad Legge" <blegge@iafrica.com>
Subject: calling exe
Message-Id: <6q3v42$st4$1@news01.iafrica.com>
Hi All
Can anyone tell me whether there is a limit to length of the argument that
you can send to an exe program as. I am calling a program and passing it a
bunch of space separated values in the form of an array.
This array consists of sets of 4 values i.e. uniqueid, name, weight, qty,
e.g.:
@array = 0007 rugby_jersey_1 500 1 0008 rugby_jersey_2 500 1 0009
rugby_jersey_3 500 1 0010 rugby_jersey_4 500 1.
I then call the program in the following way:
$var = 'miapi @array';
The program returns a URL to $var. The problem arises when I @array gets the
5th line item and tries to call miapi it fails.
Is there another more efficient way of calling an exe with arguments like
this and getting a return value.
I would really appreciate your feedback
Thanks in advance
Brad Legge
blegge@iafrica.com
Technical
------------------------------
Date: 3 Aug 1998 10:18:26 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: cannot alias $_ in perl 5.005
Message-Id: <6q42pi$lik$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Matthew White
<mwhite@csu.edu.au>],
who wrote in article <35C5561B.9D387B91@csu.edu.au>:
> Hi
> Since moving to perl 5.005 from 5.004 I cannot do aliasing
> on $_. I have used this "feature" in a rather confusticated piece of
> code which is now broken.
>
> for instance, on 5.004 this worked as (*I*) expected:
>
> perl -e '$b = "z\n"; *_ = \$b; print;'
>
> ie, it printed "\z".
>
> but on perl 5.005 it prints nothing. What is going on here?
Same behaviour on 5.005.
If you mean 5.005-threaded, then it is an absolutely different beast.
All the special variables are "lexical" (or something close to
lexical, do not remember details).
Ilya
------------------------------
Date: Mon, 3 Aug 1998 18:24:40 +1000
From: "Kim Saunders" <kims@tip.net.au>
Subject: Re: CGI, Perl & auto file transfer
Message-Id: <6q3s4k$os1$1@nswpull.telstra.net>
Kevin Babbitt wrote in message <35C215B1.E62C7EAE@3com.com>...
>Terry1519 wrote:
>
>> I have a Perl5 script which is basically a form type script. However, I
would
>> like
>> went finished to automatically send a ZIP file to the user broswers which
>> will automatically start to receive. This is similar to when a user
clicks on a
>> filename link but, I want this to be automatic. I know the user still has
to
>> select
>> a directory. Does anyone have a idea on how to do this in Perl5?
>
>Off the top of my head... (ie this isn't tested but is worth trying)
>
>The typical CGI script starts with a line like
>
>print "Content-type: text/html\n\n";
>
>which tells the user's browser that the type of data it will receive is an
HTML
>file. A ZIP file has the MIME type "application/zip," so you could change
the
>content type to this and then send the ZIP file to standard output.
Another thing to do is send some return html, and whack a refresh/forward
gizmo in the HTML header, and the browser will get the file in there.
KimS
------------------------------
Date: 03 Aug 1998 00:05:35 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <m3g1fe5yv4.fsf@windlord.Stanford.EDU>
Concerning posting and e-mailing....
Daniel Grisinger <dgris@rand.dimensional.com> writes:
> Second, it's emailed because that is common courtesy (something that,
> your charges against Abigail notwithstanding, you have a greater need of
> than anyone in this group). Many sites are equipped with slow or
> unreliable news feeds and the e-mail response ensures that the other
> individual will receive it.
Some people consider it common courtesy; some people consider it an
annoyance or worse. There is essentially no agreement on this point, and
hence pretty much any blanket statement will be wrong.
> If it really bothers you this will fix it-
> :0:
> ^Newsgroups:.*
> /dev/null
As well as deleting unread any e-mail only (not posted) replies to
messages you've posted from people who use rn varients. Not good.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Mon, 03 Aug 1998 09:06:45 GMT
From: birgitt@my-dejanews.com
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q3uj4$d66$1@nnrp1.dejanews.com>
In article <6q3hmj$8h8$2@client3.news.psi.net>,
abigail@fnx.com wrote:
> Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCVIII September
> ++ >Do we really need a language restriction, and if so, why English?
> ++ >It's not the person doing the announcement fault that others can't
> ++ >read German or Spanish, is it? Restriction to English doesn't go well
> ++ >with "worldwide".
> ++
> ++ Actually it does. If the group moderator posts/reads English, then there
> ++ should be an English restriction. How else would he/she know that a post
is
> ++ valid for inclusion?
>
> Then the question would be is: why restrict outself to one moderator
> who can only read one language?
>
Is that your assumption that the current moderator can read
just the English and the Perl language (sounds very sufficient to me)
or do you know that for a fact ?
Suggestion:
Any post in a language other than English
*should* be accompanied by a translation. If the poster can't translate
or forgot, the non-English version could still be posted with the
request to anybody who is native in the original language to translate it.
Sounds to me like worldwide cooperation. Good enough ?
I offer to translate from German into English, but I haven't seen
that this was necessary so far for relevant posts (and crap I don't
translate).
Birgitt Funk
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 03 Aug 1998 09:31:14 GMT
From: birgitt@my-dejanews.com
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q4012$ekn$1@nnrp1.dejanews.com>
In article <8cr9yzlzsy.fsf@gadget.cscaper.com>,
Randal Schwartz <merlyn@stonehenge.com> wrote:
> OK, here's my next cut at the updated charter.
> 5) Book/magazine/article/website pointers/reviews are permitted only
> from a third-party; no PR from the author or the publisher, please.
What I would like to see:
*No URL pointers* for book announcements from third parties should be
allowed. (to avoid any hidden SPAM from website owners who are associates
to online bookstores whose URLs are linked to booksellers) and a third-
party book announcement should be accompanied by a review of the poster.
Birgitt Funk
P.S. I am confused about the "non-commercial" requirement for any post.
Are commercial posts now allowed and the moderator picks the ones
worth to be mentioned and then posts them with the [COM] tag ?
How does that fit with the requirement *not* to post any commercial
announcement ? If the "no commercial posts allowed"-request is
obeyed by, no [COM] tagged post should come up.
What don't I understand ?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 3 Aug 1998 11:04:54 +0100
From: "Alexander Marquart" <info@kptkip.com>
Subject: connect CGI with MS-Access
Message-Id: <6q3uc6$4fj$1@sun579.rz.ruhr-uni-bochum.de>
Hello there!
I4ve got the problem to connect our Web-Server via CGI to the data on our
Access- Server.
Does anybody know if it is possible to get the data out of the database with
CGI to implement these in my HTML-pages?
For any hint, how to realize this or for any information, where to get
further details to solve this problem i would be very kind.
Thanks a lot and cu here soon!
Alex
------------------------------
Date: 3 Aug 1998 06:59:42 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: contact problem
Message-Id: <6q3n4u$44s$4@marina.cinenet.net>
MIKE KY (MIKE_KY@webtv.net) wrote:
: I am running an ftp program on a NT server.When I try to upload or
: download to other NT servers the program is fast as a jack rabbit but
: when it has to contact a unix server it takes forever.Can anybody give
: me an idea of how I can correct this?
Probably any number of folks on a unix, server, or ftp-related newsgroup
could tell you. However, this is a Perl newsgroup. You're not likely to
find out about ftp here, unless you mean the Net::FTP module. :-)
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Mon, 03 Aug 1998 11:00:27 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Cookie File
Message-Id: <35C58A3B.64DF147F@nortel.co.uk>
Tejas Patel wrote:
>
> Can anyone help me create a perl/cgi cookie file that will have just a
> user's name appear in the netscape cookie.txt file.
>
> Thanks.
For a different way, you could also use CGI.pm (untested):
use CGI;
$html = CGI->new();
$cookie = $html->cookie(-name=>'sessionusername',
-value=>$username);
.
.
print $html->header(-cookie=>$cookie);
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 03 Aug 98 10:36:54 +0000
From: "Rick Townsend" <rick@albrich.demon.co.uk>
Subject: Re: Copyright question
Message-Id: <2055.519T2715T6365775@albrich.demon.co.uk>
On 02-Aug-98 21:30:24, Tyler Andersen said :
TA> I would check with someone who knows the law. I've read cases
TA> where even though the individual wrote the code, the company he
TA> works for owns the copyright. I'm not sure if this is true/right,
TA> but you should still check into it. Better be safe then sorry.
I'm no expert, but I have dipped into the law regarding copyright.
Copyright refers to an individuals or companies intellectual property
rights. To posses the copyright for something does not require that
you actually produce the item, code, book whatever. But you have to
prove it was your idea, so some physical evidence is required. In the
case of a program; pseudo code, program notes or anything which
illustrates your idea should be sufficient to claim copyright. But if
you produce something in the course of your employers business (even
if you produce it in your own time) the company or employer holds the
copyright.
TA> Dustin Cobb wrote in message
TA> <35B4C8F1.90D65F50@cyberrealm.net>...
>>I'm a cgi programmer and I've written many scripts for the ISP I
>>work for. Recently, I've been told by someone else in our company
>>that the scripts that we've written in Perl cannot be copyrighted
>>due to the fact that Perl isn't a compiled language. Therefore, we
>>would have to re-write most of these scripts in another language
>>(like C/C++) to obtain a copyright. Is this true? Can anyone give
>>me an example of some software that is written entirely in Perl and
>>is legitimately copyrighted?
>>
To answer your question; perl scripts are copyright protected, but if
you are employed (not sub contracted) by a company whose business
includes their construction, as you appear to be, the copyright
belongs to the company. This applies even if you produce cgi scripts
in your own time, unless you can prove they are not related to your
employers business. In the case on an ISP I'd say that was unlikely.
Rick..
--
Albrich interactive
rick@albrich.demon.co.uk
http://www.albrich.demon.co.uk/
--
------------------------------
Date: Fri, 31 Jul 1998 16:51:40 +0100
From: Alan Silver <alan@find-it.furryferret.uk.com>
Subject: Re: Copyright question
Message-Id: <RNGgskAMgew1EwOu@find-it.uk.com>
In article <qhisp6.fad.ln@localhost>, Tad McClellan <tadmc@flash.net>
writes
>Alan Silver (alan@find-it.furryferret.uk.com) wrote:
>: >What, really, are you going to copyright? Are you going to patent
>: >
>: >$i += 1;
>
>: Aren't you being childish ? You know fully well that was not the
> ^^^ ^^^
>: intention of the poster.
>
>
> Who you?
>
> You should have an attribution in there if you are going
> to address someone in particular...
I was addressing the person who wrote the words quoted above my
comments.
Why is that so difficult to understand ?
Look around Usenet and you'll see it done thousands of times a day.
--
Alan Silver
Please remove the furryferret when replying by e-mail
------------------------------
Date: Mon, 03 Aug 1998 11:29:59 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: dbm tie and file locking
Message-Id: <35C59127.6D36420C@nortel.co.uk>
Scott wrote:
>
> Do you have to manually lock a dbm file or is it taken care of automatically?
>
> What about when you use tie? (which I haven't figured out yet).
>
Try to find the thread with the initial subject line
'Trying to lock tied ndbm file'
Zenin's initial help and my AHA later on should help you further.
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 03 Aug 1998 09:21:27 GMT
From: erikng@my-dejanews.com
Subject: error in running nmake on makefile for my perl extension module...
Message-Id: <6q3vem$dul$1@nnrp1.dejanews.com>
I'd encountered this error when I run 'nmake' on the Makefile generated from
excuting 'perl Makefile.PL'. Why? I thought the makefile generated need
not to be edited, rite? So, why there is such error occurs? Anyone can advice
me?
Error -> makefile(405): fatal error U1003:syntax error: '=' missing in macro
Stop.
This line (405) points to the following code in the makefile...(as --->)
# --- MakeMaker dynamic_lib section:
# This section creates the dynamically loadable $(INST_DYNAMIC) # from
$(OBJECT) and possibly $(MYEXTLIB). OTHERLDFLAGS = c0d32.obj INST_DYNAMIC_DEP
= $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP)
$(INST_ARCHAUTODIR)\.exists $(EXPORT_LIST) $(PERL_ARCHIVE)
$(INST_DYNAMIC_DEP) ---> $(LD) $(LDDLFLAGS) $(OTHERLDFLAGS)
$(LDFROM),$@,,$(PERL_ARCHIVE:s,/,\,) $(LDLOADLIBS:s,/,\,)
$(MYEXTLIB:s,/,\,),$(EXPORT_LIST:s,/,\,),$(RESFILES) $(CHMOD) 755 $@
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 03 Aug 1998 08:35:46 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: File::Copy and atomicity
Message-Id: <usojett4d.fsf@jimbosntserver.soundimages.co.uk>
Is File::Copy::copy atomic? Is this a fucntion of the OS, of any OS,
in general? Is there a general method by which one can determine the
atomic nature of any particular perl function or OS command?
Jim Brewer
------------------------------
Date: 03 Aug 1998 01:16:45 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: File::Copy and atomicity
Message-Id: <m390l65vki.fsf@windlord.Stanford.EDU>
Jim Brewer <jimbo@soundimages.co.uk> writes:
> Is File::Copy::copy atomic?
As a general rule of thumb, this question as posed usually doesn't make
much sense. Things aren't really atomic in and of themselves; they're
atomic with respect to some other event. In other words, the question
that you usually want to ask is something along the lines of "is
File::Copy::copy atomic with respect to file creation" or "...with respect
to modifications of the file being copied" or the like.
In any event, though, I'm afraid the answer is almost certainly no.
File::Copy::copy does a loop, reading in a file and writing out another,
and therefore is not atomic with respect to pretty much any of the
operations you'd care about.
> Is this a fucntion of the OS, of any OS, in general?
Some operating systems guarantee atomicity of certain operations under
certain conditions. For example, from the Solaris 2.5.1 man page for
open(2) under O_EXCL:
O_EXCL If O_EXCL and O_CREAT are set, open() will
fail if the file exists. The check for the
existence of the file and the creation of the
file if it does not exist is atomic with
respect to other processes executing open()
naming the same filename in the same directory
with O_EXCL and O_CREAT set.
(This sort of language is typical in discussions of atomicity.) It's a
somewhat complicated issue, and in general most things in Perl are *not*
going to be atomic with respect to most things you might care about unless
you enforce atomicity yourself (using some sort of locking protocol).
Keep in mind that an operation consisting of a sequence of atomic
operations is *not* always atomic and in fact usually isn't; atomicity is
not necessarily preserved by composition. This means that usually only
the most fundamental operations, in the absence of user-level locking, are
atomic.
> Is there a general method by which one can determine the atomic nature
> of any particular perl function or OS command?
For the most part, you have to investigate the atomicity of the underlying
system calls that Perl is using and then see if Perl is using them in such
a fashion to preserve that quality. For example, sysopen() in Perl with
O_EXCL *does* preserve the atomic property documented above.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 3 Aug 1998 10:25:37 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: File::Copy and atomicity
Message-Id: <6q4371$m9q$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Russ Allbery
<rra@stanford.edu>],
who wrote in article <m390l65vki.fsf@windlord.Stanford.EDU>:
> Jim Brewer <jimbo@soundimages.co.uk> writes:
>
> > Is File::Copy::copy atomic?
>
> As a general rule of thumb, this question as posed usually doesn't make
> much sense. Things aren't really atomic in and of themselves; they're
> atomic with respect to some other event. In other words, the question
> that you usually want to ask is something along the lines of "is
> File::Copy::copy atomic with respect to file creation" or "...with respect
> to modifications of the file being copied" or the like.
>
> In any event, though, I'm afraid the answer is almost certainly no.
> File::Copy::copy does a loop, reading in a file and writing out another,
This happens only on architectures where file has nothing but the
contents, timestamps and a coupla attributes. On other systems
File::Copy::copy is a system call.
Though I have no idea how "atomic" is, say, DosCopy() API of OS/2, to
which File::Copy::copy may be mapped. It is most probably "atomic"
w.r.t. writes (i.e., file is write-locked when doing copy), but may be
not "atomic" w.r.t. reads (so that the file may be not read-locked - I
remind that on OS/2 locking is real, not advisory).
> and therefore is not atomic with respect to pretty much any of the
> operations you'd care about.
Ilya
------------------------------
Date: Mon, 03 Aug 1998 07:08:56 GMT
From: Jay Taylor <sysop97@nospam.callisto.si.usherb.ca>
Subject: Frustrated In Quebec
Message-Id: <35C560E3.5968@nospam.callisto.si.usherb.ca>
Basically I am pattern matching in a corpus/text file for the
word/string:
" normal "
with spaces on either side. The script finds all instances of the word
normal and outputs to the screen.
---------------------------------------------------------
When I use this substitution variable:
if ($inputData[$i] =~ s#$in{'word'}#<b>$in{'word'}</b>#io)
it works:
http://callisto.si.usherb.ca/cgi-bin/cgiwrap/eslcafe/test/test.yes.pl
---------------------------------------------------------
When I use this substitution variable:
if ($inputData[$i] =~ s#(\w+|^)\s*($in{'word'})\s*(\w+|$)#<B>$1<\/B>
<B>$2<\/B> <B>$3<\/B>#iox)
It does NOT work:
http://callisto.si.usherb.ca/cgi-bin/cgiwrap/eslcafe/test/test.not.pl
It gives me normal - and all other possible variations.: normal,
normally, etc.
---------------------------------------------------------
I've narrowed the problem down to this:
If I cut the x out at the end of the string: "... #iox)"
It behaves. It searches only for " normal " and does not output other
crap.
QUESTION:
What blinking difference does the x make? Does it chop the spaces out of
my input string: " normal " and why?
---------------------------------------------------------
The full scripts can be viewed in:
http://callisto.si.usherb.ca/~eslcafe/cgi-bin/test/
Post & Mail if you can.
Delete "nospam." out of the address.
mailto:sysop97@nospam.callisto.si.usherb.ca
------------------------------
Date: 3 Aug 1998 07:31:29 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Frustrated In Quebec
Message-Id: <slrn6sapqh.hb6.sholden@pgrad.cs.usyd.edu.au>
On Mon, 03 Aug 1998 07:08:56 GMT, Jay Taylor
<sysop97@nospam.callisto.si.usherb.ca> wrote:
<snip>
>When I use this substitution variable:
>
>if ($inputData[$i] =~ s#$in{'word'}#<b>$in{'word'}</b>#io)
>
>it works:
<snip>
>When I use this substitution variable:
>
>if ($inputData[$i] =~ s#(\w+|^)\s*($in{'word'})\s*(\w+|$)#<B>$1<\/B>
><B>$2<\/B> <B>$3<\/B>#iox)
>
>It does NOT work:
<snip>
>
>I've narrowed the problem down to this:
>
>If I cut the x out at the end of the string: "... #iox)"
But you still decided to use examples that were different in other ways so
I would waste some time reading this post, instead of just adding an x to the
first one...
>
>It behaves. It searches only for " normal " and does not output other
>crap.
>
>QUESTION:
>
>What blinking difference does the x make? Does it chop the spaces out of
>my input string: " normal " and why?
You could always try the documentation... the first page of perldoc perlre
will tell you the answer.... In other words RTFM.
>
>---------------------------------------------------------
>
>The full scripts can be viewed in:
>
>http://callisto.si.usherb.ca/~eslcafe/cgi-bin/test/
>
>
>Post & Mail if you can.
>Delete "nospam." out of the address.
>
>mailto:sysop97@nospam.callisto.si.usherb.ca
If I didn't have to delete the nospam I would... but oh well...
Sam
------------------------------
Date: 03 Aug 1998 00:17:13 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: hiding user input
Message-Id: <m3d8ai5ybq.fsf@windlord.Stanford.EDU>
Boiled Animal By-Products <sp@m.block> writes:
> Or even just not read any posting which is from somebody you don't know,
> getting round the thorny prob of coming into contact with the plebs
> groping their way through the trivialities of learning the basics,
> leaving intellectual space free to consoder perl guru advanced pursuits
> like how to casually mention Larry by his first name in your postings so
> it seems you drop round his house for a coffee after a hard days slaving
> over your hand coded unix OS
I don't think this is entirely fair. While I'd agree with you in most
other settings, in Usenet culture there's a *strong* tradition towards
referring to people by their first name or posting handle regardless of
how well you know them (unless their full name is needed to avoid
ambiguity). I don't find people in this group referring to Larry Wall as
Larry any odder than I find people referring to David Lawrence as tale in
news.groups, or someone referring to Professor Spafford as spaf.
> or what's the flashiest way to make a simple function unreadable so you
> can stick it on your postings as a signature
I resemble that remark! :)
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 03 Aug 1998 08:44:41 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: Interesting Question needs Quick Answer
Message-Id: <ur9yytspi.fsf@jimbosntserver.soundimages.co.uk>
Russ Allbery <rra@stanford.edu> writes:
>
> P L Hegarty <sm8plh@csc.liv.ac.uk> writes:
>
> > I want to write a perl script which produces as its output an exact copy
> > of itself. So when you run the script you get exactly the same output to
> > screen as if you used 'cat' or 'type'. You can not read anything into
> > the script or use any system calls. That last bit is the heart of the
> > problem.
>
> See my sig.
>
> --
> #!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
> $^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
> 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
> rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
Russ, that's really cool! Thanks, that's made my day!!!
Jim Brewer
------------------------------
Date: 03 Aug 1998 09:21:23 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: IO::Socket problem / alternative?
Message-Id: <uogu2tr0c.fsf@jimbosntserver.soundimages.co.uk>
michael@mcaver.com (Michael Caver) writes:
> An example URL is "http://www.maltergalleries.com/", which is IP
> address "207.115.185.150". I get a 400 error with IO:Socket and when
> I use the IP address in Netscale. The name address in Netscape works
> fine.
Two things, which have been mentioned, LWP and adding the HTTP/1.1
host header. Any web server which is HTTP/1.1 compliant will require
the host header to determine which virtual web to access for
requests. If you don't have that header present you won't get what you
expect.
Use LWP if you can, it greatly simplifies your efforts and always
remembers to add the host header.
Jim Brewer
------------------------------
Date: 3 Aug 1998 06:57:42 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Newbie questions...help!
Message-Id: <6q3n16$44s$3@marina.cinenet.net>
Ricardo Astudillo (astudill@ix.netcom.com) wrote:
: I'm probably looking in the wrong places, but I need to know what
: exactly the following things mean;
: 1) What does it mean when there's an ! in front of $string ?
perldoc perlop, or read the Llama or Camel book.
: 2) Somebody tell me exactly what this does:
: ($line = <FILE>);
Oh, please. Do some *basic* research before posting here! This is
covered *early* in the Llama book, or for that matter in any decent Perl
book, along with in the online doc.
: and while you're at it,
: $line =~ s/[\r\n]//g;
What this means is that someone is too new to Perl to be aware that
$line =~ tr/\r\n//d;
will do the same thing far more efficiently.
perldoc perlre
perldoc perlop
We're more than pleased to answer questions here, but only if you show
some rudimentary initiative.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Mon, 03 Aug 1998 11:36:10 +0100
From: "Chi Letton" <che@gwent.nhs.gov.uk>
Subject: Newbie: Perl and Oracle?!?
Message-Id: <35C59299.95E0E55B@gwent.nhs.gov.uk>
Hello all
I am very new to this Perl stuff so please be patient.
I need to get Perl to access Oracle tables. I will need to read and
write. Is there an easy way to do this? (I hope so!)
My UNIX knowledge is less than my Perl, sorry.
Che
------------------------------
Date: Mon, 03 Aug 1998 06:36:25 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: Newbie: Perl and Oracle?!?
Message-Id: <35C592A9.65585F90@fccjmail.fccj.cc.fl.us>
Chi Letton wrote:
>
> Hello all
>
> I am very new to this Perl stuff so please be patient.
>
> I need to get Perl to access Oracle tables. I will need to read and
> write. Is there an easy way to do this? (I hope so!)
>
> My UNIX knowledge is less than my Perl, sorry.
>
> Che
Two things: There is ORAPERL; and Nothing worthwhile is easy.
Something like that, :)
-Sneex- :]
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
------------------------------
Date: Mon, 3 Aug 1998 10:25:30 +0100
From: Barney Tyrwhitt-Drake <Barney@tdrake.demon.co.uk>
Subject: Re: Non-Standard Data File
Message-Id: <gi6bvOAKIYx1Ewj9@tdrake.demon.co.uk>
In article <6q2eol$pg4$1@news-2.news.gte.net>, Glenn Dixon
<webwide@writeme.com> writes
>Need help with non-standard data file. Either
>A) transform into a standard data format, or
>B) query it directly
>
>This will eventually be queried via CGI and output to HTML on-the-fly.
>
>The format is three pieces of data per line, several lines per
>'record'.....the number of lines per record is NOT fixed (some have 5,
>some have 9). Here's a sample of ONE record:
>
>0 @I1@ INDI
>1 REFN P1
>1 NAME Glenn Edward /DIXON/
>1 SEX M
>1 BIRT
>2 DATE 7 Jan 1961
>2 PLAC Fort Worth, TX
>1 FAMC @F3@
>1 FAMS @F1@
>1 FAMS @F2@
>
>the first column is "0" at the beginning of each record....
>
For the benefit of the genealogically unaware, this is a GEDCOM
(GEnealogical Data COMmunications) format text file commonly used for
data interchange between family history programs. One of the quirks that
Glenn doesn't mention is that the text between a pair of @ symbols is a
pointer to another record in the file, and that these records can be in
any sequence. It follows that if you want to create links between
records you must iterate the file to create a pointer table or your code
will be running for a very long time...
Perl is so good at pattern matching that it makes no sense to parse each
GEDCOM record into a rigid field structure, particularly as a single
record can have an almost infinitely variable number of lines. Take your
option B and rely on Perl's operations on the unaltered text lines.
So, I'd recommend iterating the file and creating an array, @lines, with
the full text of each line. Don't strip the leading digit since it
contains 'level' information. In other words the 2 DATE line indicates
that the date that follows is for the preceding 1 BIRT event. Next build
2 hash tables. One for each of the beginning of record markers using the
record pointer as the key and the line number (the index of @lines) as
the value. The second using the name as the key and the line number as
the value - assuming your CGI script will be searching on names. You can
do all of this in one pass through the file.
Then all you need to do is to get the line number for a NAME tag that
matches a CGI query input, step forward in the @lines array until you
get to the FAMC and/or FAMS tags, read the pointer value in those lines,
look it up in the hash table, move to that line in @lines and read the
spouse or parent name that you will use in your HTML.
P.S. I see you've been married more than once! :)
--
Barney Tyrwhitt-Drake
Drake Software web site: http://www.tdrake.demon.co.uk
------------------------------
Date: Mon, 03 Aug 1998 07:56:50 GMT
From: divakarpc@my-dejanews.com
Subject: Perl Counter
Message-Id: <6q3qg2$8rf$1@nnrp1.dejanews.com>
Hi there,
Is it possible to make a perl counter not to increment on refresh of the
page.
Thanks and regards,
--Divakar--
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 03 Aug 1998 06:34:09 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
Subject: Re: Perl Counter
Message-Id: <35C59221.EBCD1CCA@fccjmail.fccj.cc.fl.us>
divakarpc@my-dejanews.com wrote:
>
> Hi there,
>
> Is it possible to make a perl counter not to increment on refresh of the
> page.
>
> Thanks and regards,
> --Divakar--
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
With PERL all things are possible - if not very accurate -
as in this case :)
Problem is - How do you know if someone hit the refresh/reload button?
Figure that out and you will know how to prevent it. Good luck!
HTH,
-Sneex- :]
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
------------------------------
Date: 03 Aug 1998 08:51:20 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: printed & bound perl 5.005 manuals?
Message-Id: <upveitsef.fsf@jimbosntserver.soundimages.co.uk>
Randal Schwartz <merlyn@stonehenge.com> writes:
> I'm in the process of transforming the 5.005_01 docs into both PS and
> PDF files for inclusion in the CPAN. We've got the basic process to
> work, but I'm shaking out bugs in "pod2ps" right now, and still trying
> to figure out how to get some of the READMEs included (which aren't in
> POD format).
>
> Stay tuned.
Thanks from many of the nameless us all over the place who appreciate
your efforts in such a task. Such a task, unfortunately, being beyond
the ken of those of us who will benefit most.
Jim Brewer
------------------------------
Date: 3 Aug 1998 07:13:06 GMT
From: Wolfgang Denk <wd@uebemc.siemens.de>
Subject: Re: WANTED: Perl Autoreponder - Any Takers?
Message-Id: <6q3nu2$7ks$1@galaxy.mchh.siemens.de>
David Deutsch wrote:
> I'm in need of a perl based autoreponder that is called from the
> /etc/aliases file. It will be ran under Linux with Sendmail 8.9.x and
> must perform the following functions:
Try mailagent - it's great, and it's in perl.
Wolfgang Denk
--
Office: (+49)-89-722-27328, Fax -36703 Wolfgang.Denk@oen.siemens.de
Private: (+49)-89-95720-110, Fax -112 wd@denx.muc.de
Hacking's just another word for nothing left to kludge.
------------------------------
Date: 3 Aug 1998 07:58:06 GMT
From: vboehm@t-online.de (Volker Bvhm)
Subject: Where to get a Perl/Tk for Windows?
Message-Id: <6q3qie$ip$1@news00.btx.dtag.de>
Hi,
I'm searching for a Perl/Tk running on Windows 95. I'd like to get
a binary version, because I tried to compile the Perl5.004_74 and
TK800.008 with a Microsoft VC 4.2 and a VC 5.0 ant got nothing but
errors. The binary version from www.perl.com (5.003_07) has no Tk
with it. And I need a Perl _with_ Tk.
Where can I get a binary version of Perl _and_ Tk running on Windows 95
and Windows NT?
Thanks in advance.
Volker
--
Volker Boehm E-Mail: vboehm@t-online.de
Vosskuhl 5 Tel.: +49 4141 981155
D-21682 Stade Fax: +49 4141 981154
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3323
**************************************