[10053] in Perl-Users-Digest
Perl-Users Digest, Issue: 3646 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 6 02:07:07 1998
Date: Sat, 5 Sep 98 23:00:18 -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 Sat, 5 Sep 1998 Volume: 8 Number: 3646
Today's topics:
Re: "reading line by line from a file until condition i <maierc@chesco.com>
Re: "use" in subroutines (Abigail)
[Q] Determining if certain files exist at specific IPs russthomas@my-dejanews.com
Re: a pesky perl runtime problem <maierc@chesco.com>
Re: Beginner need help with sendmail-t <maierc@chesco.com>
Re: Beginner needs help <maierc@chesco.com>
Re: Code to Check for acceptable file type (Abigail)
fork/exec from perl? (Ken Williams)
help, problem with dead module <scott@dsuper.net>
Re: History of Perl - round 1 (Abigail)
Re: History of Perl - round 1 <mpersico@erols.com>
Re: History of Perl - round 1 (Neil Kandalgaonkar)
Re: Outputting to MS Excel file format <Russell_Schulz@locutus.ofB.ORG>
Re: Parsing XML and HTML (was: Re: Better Regular Expre <peterm@zeta.org.au>
paul@miraclefish.com and gossamer@tertius.net.au <mpersico@erols.com>
Re: Perl compiler nospam@domain.com
perlshop error <mrdavex@interlog.com>
Re: Problems building threaded perl 5.005 on OSF 4.0d <jure.simsic@uni-lj.si>
Randal Schwartz in Dallas on 10/3 (Brand Hilton)
Re: reading a file backward <uri@sysarch.com>
Re: session id <maierc@chesco.com>
wie Formular mit "CGI-BIN" verfeinern ? <joerg.nieswand@leverkusen.netsurf.de>
WWWBoard Questions steele4life@my-dejanews.com
WWWBoard Questions steele4life@my-dejanews.com
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 05 Sep 1998 23:59:46 -0400
From: Charles Maier <maierc@chesco.com>
Subject: Re: "reading line by line from a file until condition is met"
Message-Id: <35F208B2.C35A7754@chesco.com>
lsgs@my-dejanews.com wrote:
>
> Hi,
>
> I'm a newbie. I'm trying to read a list from a file that has
> two variables, "name" and "password" (see this portion of
> the script below). When the correct name and password are
> entered, the user has access to another area of the site. I can't
> get the while statement to work and I'm not sure what I'm
> doing wrong. Any help will be appreciated.
>
> if ($query eq "home"){
>
> open (DATABASE,"new_data/list.db") || die("Cannot open
> database: $!");
>
> while (<DATABASE>) {
> @record = split(/\:/, $_);
> if ($record[0] eq $name and $record[1] eq $passwd) {
> close ("DATABASE");
> &display;
> }
>
> else {
> close ("DATABASE");
>
> &noway;
>
> }
>
> }
>
> }
>
> Laure
>
This is many times caused by the newline character coming from the
end-of-line when you read in the file. You are testing for equal.. and
it is a good bet what you are testing for is not what you get from the
file read. Try chomp() -ing the data before you test it against constant
data.
BTW.. you do not need to quote the filehandle.. in the close statement.
Chuck
------------------------------
Date: 6 Sep 1998 01:13:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: "use" in subroutines
Message-Id: <6ssnjk$1gd$1@client3.news.psi.net>
Mark-Jason Dominus (mjd@op.net) wrote on MDCCCXXX September MCMXCIII in
<URL: news:6spuh0$42r$1@monet.op.net>:
++ In article <6sprpj$mhi$1@news1.bu.edu>,
++ John Siracusa <macintsh@cs.bu.edu> wrote:
++
++ >sub foo
++ >{
++ > require MyModule;
++ > import MyModule;
++ > # stuff...
++ >}
++
++ If `foo' is called multiple times, this will call `import' multiple
++ times too. This is probably undesirable. One possible solution:
++
++ >sub foo
++ >{
++ > require MyModule;
++ > import MyModule unless $imported{MyModule}++;
++ > # stuff...
++ >}
++
++ It seems to me there's a better solution, but I can't think offhand
++ what it is.
sub foo {
unless (exists $INC {'MyModule.pm'}) {
require MyModule;
import MyModule;
}
# stuff
}
This doesn't need an extra global hash, and will import from MyModule,
if someone explicitely deletes $INC {'MyModule.pm'}.
The disadvantage of using 'require' over 'use' is that if MyModule
fails to compile, you'll be warned when compiling the application,
while using 'require' in this case generates a runtime error.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: Sun, 06 Sep 1998 04:30:21 GMT
From: russthomas@my-dejanews.com
Subject: [Q] Determining if certain files exist at specific IPs
Message-Id: <6st34u$dtj$1@nnrp1.dejanews.com>
Hi,
I would like to write a perl script (preferably Win32, but I can set it up on
a linux box if need be) that searches a list of predetermined web site IP
addresses and determines whether an index.htm file or another file (e.g.
glop.htm) exists at that site. If glop.htm does exist and index.htm does
not, I would like to check the text in the file to verify that it contains a
certain phrase.
I am a novice perl programmer so I would like to suffer thru the coding
myself to gain experience; however, I would like to know if there are any
specific tools, modules, or other intelligent approaches that will make this
task easier and possibly a tip on the syntax of using said tools or
approaches.
Thanks in advance for any assistance,
Russ
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Sat, 05 Sep 1998 23:51:53 -0400
From: Charles Maier <maierc@chesco.com>
Subject: Re: a pesky perl runtime problem
Message-Id: <35F206D9.B0C9EEE@chesco.com>
E Mills, software scientist wrote:
>
> I just chased down a bug which was innocuous. My code was something like
>
> {
> (stuff)
> # subroutine call
> mysub;
> (more stuff)
> }
>
> sub mysub
> {(more stuff)
> }
>
> This all interprested fine, but the (more stuff) wasn't being executed.
> Turns out the problem was that the call should have been:
>
> mysub();
>
> That's all well-and-good, but why no interpreter errors in the first
> case? How would the interpreter interpret just plain old "mysub"?
> Apparently it treated it as a comment.
>
> Any idears?
>
The docs tell you .. if you define your sub BEFORE you call it.. your
example will work. The generally proper way to call a sub is with
"&mysub"
Chuck
------------------------------
Date: Sun, 06 Sep 1998 00:03:11 -0400
From: Charles Maier <maierc@chesco.com>
Subject: Re: Beginner need help with sendmail-t
Message-Id: <35F2097F.828321A4@chesco.com>
Soft Science wrote:
>
> Hi:
>
> OPEN (MAIL, "|$mailprogram -t") || die "can't open $mailprogram";
> What does -t in the above line do?
>
> -Kumar Sundaram
--
Try "man sendmail"
The 't' is to tell sendmail to look for "To:" in the data stream for
addressing info...also other fields.
Chuck
------------------------------
Date: Sun, 06 Sep 1998 00:13:07 -0400
From: Charles Maier <maierc@chesco.com>
Subject: Re: Beginner needs help
Message-Id: <35F20BD3.26A7780@chesco.com>
Tijs wrote:
>
> Hello,
>
> After a calculation my script displays e.g. 270,7
>
> this must be 270,70 because it's a currency.
>
> or
>
> 270 this must be 270,00
>
> $n =$premie; # $premie is the result of a calculation
> $n =~ s/\./\,/g; # convert . into ,
> $premie="<strong> $n</strong>";
> print "$premie";
>
> Thanks
I am not sure what the commas mean.. I assume this is another form of
currency..decimal point??
But.. try "printf"
$d = 2.7;
printf("%6.2f",$d);
outpute: 2.70
The '6' tells it to print in a 6 char field
The '.2' tells it to maintain 2 decimal places
--
Chuck Maier
CDM Consulting Services
http://www.cdmcon.com
(610) 942-2726
------------------------------
Date: 6 Sep 1998 01:38:04 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Code to Check for acceptable file type
Message-Id: <6ssp1s$1gd$2@client3.news.psi.net>
Mike (mhanson@prtel.com) wrote on MDCCCXXXI September MCMXCIII in
<URL: news:35F18BA1.6F00@prtel.com>:
++ @array = ("htm", "html", "shtml"); #array of acceptable file types.
++ $string = "index.htm"; #Yield acceptable
++ $string2 = "index2.shtml"; #Yield acceptable
++ $string3 = "pic.gif"; #yield unacceptable
++ How would you check to make sure the file extension in the string is an
++ acceptable file type that is stored in an array?
++ Thanks.
{ local $" = '|';
$string =~ /\.(?:@{[map {quotemeta} @array]})$/o;
}
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: Sun, 06 Sep 1998 04:43:19 GMT
From: tekkin@hotmail.com (Ken Williams)
Subject: fork/exec from perl?
Message-Id: <6st3p1$r4r@cabernet.niagara.com>
I have a perl cgi script that needs to run another perl script, but I don't
want the first script to wait until the second ends before it can end. I've
tried forking, and exec, but the first script won't output(or flush) any HTML
code util the second script offically ends for some reason.
Does anyone know how I can run a second perl script and have it startup
completely indepentent of the first script so they both don't care about each
other?
Thanks.
------------------------------
Date: Sun, 6 Sep 1998 00:59:42 -0400
From: "Scott Johnson" <scott@dsuper.net>
Subject: help, problem with dead module
Message-Id: <6st516$ams$1@delphi.dsuper.net>
Hi,
I'm not sure this is the right list, but here it goes.
I have a dead module and I need to uninstall it. Is there a way to
uninstall a module from a list? or is there a file to remove it from?
Thank for any help.
Scott Johnson
scott@dsuper.net
------------------------------
Date: 6 Sep 1998 02:21:56 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: History of Perl - round 1
Message-Id: <6ssrk4$1qt$1@client3.news.psi.net>
Elaine -HappyFunBall- Ashton (eashton@bbnplanet.com) wrote on MDCCCXXXI
September MCMXCIII in <URL: news:35F1C563.E63278E@bbnplanet.com>:
++ goodness, people get such a wedgie over the lack of capitals in my
++ writing. i didn't know geeks were such sticklers for grammar and style.
Capitals, proper punctuation, spelling, and grammar makes text easier
to read. But, if you want to limit your audience, don't bother with those.
Abigail
--
perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}'
------------------------------
Date: Sun, 06 Sep 1998 00:27:55 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: History of Perl - round 1
Message-Id: <35F20F4B.1298BE9C@erols.com>
If I remember correctly, one of the primary characters in Arthur Haley's
book "Airport' (the granddaddy of all distaster genre) was a secretary
who had the capitals removed from her typewriter.
Just a random fact.
--
#!/usr/bin/perl -- Matthew O. Persico
print "Just Another Perl Neophyte\n";
## Simplicity is a blessing when you're
## supporting the program at 2AM
------------------------------
Date: 6 Sep 1998 01:40:49 -0400
From: yuiop@smelt.openface.ca (Neil Kandalgaonkar)
Subject: Re: History of Perl - round 1
Message-Id: <6st791$21s@smelt.openface.ca>
>Elaine -HappyFunBall- Ashton (eashton@bbnplanet.com) wrote on MDCCCXXXI
>September MCMXCIII in <URL: news:35F1C563.E63278E@bbnplanet.com>:
>++ goodness, people get such a wedgie over the lack of capitals in my
>++ writing. i didn't know geeks were such sticklers for grammar and style.
That's going to be page one of your history of Perl. Your average geek may
or may not care about language. Perl geeks are invariably hyperaware of
language and often linguistics. Some are more prescriptive than others.
Larry Wall on Linguistics & Perl
http://www.dejanews.com/getdoc.xp?AN=107048439.1
someone else makes the same point about Unix geeks in gneral:
http://www.performancecomputing.com/features/9809of1.shtml
--
Neil Kandalgaonkar yuiop communications
neil@yuiop.com
------------------------------
Date: Sat, 5 Sep 1998 16:33:09 -0400
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: Outputting to MS Excel file format
Message-Id: <19980905.163309.8h9.rnr.w164w@locutus.ofB.ORG>
jonathan white <jwhite@accesshub.net> quotes and writes:
>> What I usually do is send a
>> 'Content-type:application/excel\n\n' line and then send a
>> bunch of tab separated text.
(of course, that should be `Content-Type: application/vnd.ms-excel\n\n'.)
> There are two problems with using a tab, comma, or
> any kind of delimited file. One is that there is no formating.
so use SYLK.
> Second and more importatnt is sending numerics as text strings. If I
> create output to a file, newclients.csv
>
> "New Clients Report - 24 Aug 1998"
> "Name","Account #"
> "Bill Smith", "083" <-- drops the leading 0
have you tried <"Bill Smith","'083"> ?
--
Russell_Schulz@locutus.ofB.ORG Shad 86c
------------------------------
Date: Sun, 06 Sep 1998 11:30:13 +1000
From: "Peter G. Martin" <peterm@zeta.org.au>
Subject: Re: Parsing XML and HTML (was: Re: Better Regular Expressions)
Message-Id: <35F1E5A5.EC17E643@zeta.org.au>
cicero_n@my-dejanews.com wrote:
>
> >>--------------------------
> After the fiasco that has been HTML, I think most people will
> be sticking to the strict XML spec and properly blowing chunks
> on bad code.
> --------------------------<<
>
> I do not think so.
> The cat is already out of the bag. Meaning, now that mere
> mortals can and do create Web pages, anyone trying to
> impose harsh new rules is guaranteed to fail miserably.
>
Standards for language are fine as starting points.
What applications do with variations or mistakes in the language is
their
affair. That's the point of XML, surely.. It's supposed to deliver
entities as content + a context. What applications do with that
will invariably vary, anyway.
The question is, as we've found with HTML, how much effort has to be
put into feeding back the applications' varied approaches into
refinements or amendments to the standard, and how does that process
work ?
Paradoxically, English as a language has benefitted
from having had "applications" (aka humans) capable of interpreting
non-grammatical variations from the "standard". It lost declensions
and conjugations and funny endings of words and .... got more efficient.
Largely +because+ it was and is still being used by people who don't
necessarily know or follow all it's "rules".
The standard changed. (Wanna see how much ? Try reading Chaucer )
perl "lost" a few requirements for ()s and things and got to be
English-like.
And more people understand it because of that.
It's a complex world. Those who feel they +must+ impose +total+ order
are doomed to failure and usually dangerous.
And much as we'd all like it to be nice and neat, it won't be.
--
peterm
Peter G. Martin, Tech.Writer & Perl User, The Scribe & Chutney Trust
peterm@zeta.org.au, http://www.zeta.org.au/~peterm
ROZELLE, Australia +61 2 9818 5094
Use of the passive should be minimised.
------------------------------
Date: Sat, 05 Sep 1998 23:59:52 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: paul@miraclefish.com and gossamer@tertius.net.au
Message-Id: <35F208B8.A45C27C2@erols.com>
Numerous attempts to reach you by mail have failed. Here, therfore, are
the combined answers to your similar questions. Apologies to others for
the bandwidth usage:
**********
h2xs is best documented and explained in the perl docs and "Effective
Perl Programming" ISBN 0-201-41975-0, Addison Wesley.
The short story is:
1) Make a dir $HOME/perlstuff
2) cd $HOME/perlstuff
3) Assume your module is called Foo::Bar
4) h2xs -X -n Foo::Bar
5) now you have a directory $HOME/perlstuff/Foo/Bar and in it you'll see
some files. Check 'em out and have the docs handy. This is the simplest
way to start a
module. I'm under a deadline here so I cannot expand further. Sorry.
*********
xemacs: all I did was this in my .emacs file:
(defun mop-standard-make ()
"MOP - set the normal compile command and kick it off"
(interactive "_")
(setq compile-command "make ")
(call-interactively 'compile))
(defun mop-perl-make-and-install ()
"MOP - set the command to install a Perl module to local tree and kick
it off"
(interactive "_")
(setq compile-command "make test install PREFIX=$HOME/local ")
(call-interactively 'compile))
;; The more commonly used one gets the easier keystroke.
;; Someday, I'll ask...
(global-set-key "\C-xc" 'mop-perl-make-and-install)
(global-set-key "\C-xC" 'mop-standard-make)
*********
Perl:
I set up a local repository of mine to test stuff. Again, I've got
deadline pressure here, so I can't go into great detail, but this will
get you started.
You may also want to talk with gossamer@tertius.net.au. I gave him the
same info.
Just mention my name so he knows where you got his email address.
The short of it is that you create a local shadow copy of the
installation's dir structure, addit to your PERL5LIB
variable and voila! You have a place to install your stuff and run it
without bothering the sysadmins!
PERL5LIB has the same format as a PATH. Here is my .profile.perl file I
run from .profile on my UNIX box when I log in:
.profile.perl:
##
## .profile.perl
##
## My local perl stuff. Keep it 'sh'able with separate lines
PERSICOM_PERL5ROOT=/export/home/persicom/local
PERL5ROOT=lib/perl5
PERL5LEAVES=sun4-solaris/5.00404:.:site_perl/sun4-solaris:site_perl
PERL5LIB=""
for i in `echo $PERL5LEAVES | sed 's/:/ /g'`
do
LEAF=$PERSICOM_PERL5ROOT/$PERL5ROOT
if [ ! "$i" = "." ]
then
LEAF="$LEAF/$i"
fi
PERL5LIB="${PERL5LIB}${LEAF}:"
done
export PERL5LIB
export PERSICOM_PERL5ROOT
MANPATH=$PERSICOM_PERL5ROOT/$PERL5ROOT/man:$MANPATH
export MANPATH
## End of .profile.perl
Now, you need to substitute all the PERSICOM stuff with your name,
the /export/home/persicom with your home dir, the sun4-solaris stuff
with your architecture and the 5.004 stuff with your version.
Do a perl -V and look at the bottom before you do this. You'll see
perl's /usr/local dirs. These are the ones you want to
mimic in PERL5LEAVES.
Then run the .profile.perl to get the PERL5LIB defined. Next, echo
$PERL5LIB. For each directory in the variable, do a mkdir -p. The -p
is the optin to "recusively make subdirs if they don't exist in order to
get down
to the last one!"
Now when you create modules, you do h2xs. When you change the VERSION
number variable in yout modules you redo perl Makfile.PL. Testing is
make test. Installing is:
make install PREFIX=$PERISCOM_PERL5ROOT
Again, you substitute your name and variables. Voila! Your modules end
up in your PERL5LIB dirs and you get them when you run.
The only thing to do is monitor the install. Sometimes, the install
cannot make a dir it needs. Just mkdir it yourself and re-run the
install.
As far as the emacs stuff goes all I did was reprogam the Control-x-c
keystroke from "make" to
"make test install PREFIX=$PERISCOM_PERL5ROOT". (See above for details).
Note that by always
doing the 'test' target before the 'install' target, the default
test.pl file gets run (it was made by h2xs). If you don't ever touch the
test.pl file, it will simply try to "use" your module, which is,
effectively, a "compile". Try it: introduce a silly error into a module
and do the make test install PREFIX=$PERISCOM_PERL5ROOT and
see what happens.
Enjoy.
PS - Get xemacs. It will be a steep learining curve but at the top of
the hill lies a beautiful progamming plateau.
And if you are PC-centric, don't worry: the .profile.perl should be
portable to NT's command language and
xemacs runs on NT. I know - I just built the latest beta.
Let me know how it works for you.
--
#!/usr/bin/perl -- Matthew O. Persico
print "Just Another Perl Neophyte\n";
## Simplicity is a blessing when you're
## supporting the program at 2AM
------------------------------
Date: 6 Sep 1998 03:14:01 GMT
From: nospam@domain.com
Subject: Re: Perl compiler
Message-Id: <6ssulp$fr9$1@picasso.op.net>
Tom Christiansen (tchrist@mox.perl.com) wrote:
: nor shall I support others doing so. I am still bitter about it,
: which is probably reflected in my recent postings on these matters.
: I swore then I would only write in Perl lest someone legally entitled
: to the program not be able to get at the source. This compiler thing,
: which I instigated, is being used for evil, a word I use not lightly.
Wouldn't it make sense to build into the compiler that ships
with Perl a special feature: always build into every binary
the automatic ability to retrieve the original source
code from any Perl binary? How hard would this be?
Fix it so that it would not run properly without it?
So, for example, just use a -S switch with any perl binary,
to get the original source.
Of course, any user could just hack the source code of the compiler,
to shut this compiler feature off, but this might not be so easy
for most users.
Or maybe just make sure that a reliable decompiler is always available
with each version of the compiler.
This way, you could have both compiled binaries and open source,
all in one. Why not?
Sorry if this is a stupid suggestion. :)
--
##--------------------------------
## John Nolan
## jpn acm org
##--------------------------------
------------------------------
Date: Sun, 06 Sep 1998 00:38:48 -0400
From: Dave Aldan <mrdavex@interlog.com>
Subject: perlshop error
Message-Id: <35F211D8.1EBA4D45@interlog.com>
I'm trying to configure Perlshop. I keep getting "Missing File Title"
error when I enter the store. Can someone please help me correct this?
Thanks
------------------------------
Date: Sun, 06 Sep 1998 03:27:08 +0000
From: Jure Simsic <jure.simsic@uni-lj.si>
Subject: Re: Problems building threaded perl 5.005 on OSF 4.0d
Message-Id: <35F2010C.C443FB30@uni-lj.si>
Actually I got it. Had to comment strange U32 out (around line 480 in
utf8.c) and change it to UV. The code is returning UV and in proto.h you
have utf stuff declared as
VIRTUAL UV to_utf8_lower _((U8 *p));
//U32
UV
to_utf8_upper(U8 *p)
{
UV uv;
...
Charles M Richmond wrote:
>
> It looks like the use of Perl_to_utf8_title is occuring before the
> compiler sees a declaration. If that is the case, then explicitly
> add in a declaration line at the top of the file that is getting
> the error. The same goes for Perl_to_utf8_lower. An example of
> what I mean is:
>
[snap]
>
> Without the 'extern's the following type of error would be generated:
>
> cc: Error: jn.c, line 8: In this declaration, the type of "tryit" is not
> compatible with the type of a previous declaration of "tryit" at line
> number 5 in file jn.c.
> void tryit(int jn)
> -----^
>
> Jure Simsic wrote:
> >
> > Has anybody gotten this to work. I tried perl 5.005 and 5.005_51 but
> > failed. I tried with just ./Configure --Dusethreads -des and with
> > adittional -pthread to ccflags, -pthread to ldflags, -lpthread -lc_r to
> > lddlflags and native malloc as described in README.threads but make
> > always breaks at utf8.c. Transcript:
> >
> > CCCMD = cc -DPERL_CORE -c -pthread -std -fprm d -ieee
> > -D_INTRINSICS -
> > I/usr/local/include -D__LANGUAGE_C__ -O4
> > `sh cflags libperl.a utf8.o` utf8.c
> > CCCMD = cc -DPERL_CORE -c -pthread -std -fprm d -ieee
> > -D_INTRINSICS -
> > I/usr/local/include -D__LANGUAGE_C__ -O4
> > cc: Error: utf8.c, line 483: In this declaration, the type of
> > "Perl_to_utf8_uppe
> > r" is not compatible with the type of a previous declaration of
> > "Perl_to_utf8_up
> > per" at line number 644 in file proto.h.
> > to_utf8_upper(U8 *p)
> > ^
> > *** Exit 1
> > Stop.
> >
> > Any ideas?
> >
> > Btw, it does build without threads..
> >
> > Jure
>
> --
Sorry, I'm trying to post on some nutty server that keeps complining
about more included text than written so I have to generate some more..
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
------------------------------
Date: 6 Sep 1998 04:09:52 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Randal Schwartz in Dallas on 10/3
Message-Id: <6st1ug$bv8@mercury.adc.com>
I've just learned from Randal that he's going to be in Dallas on
Saturday, October 3rd. I'll give you more details as plans firm up,
but in the mean time, everybody in Dallas and Ft. Worth free up your
Saturday evening!
Brand
--
_____
|/// | Brand Hilton bhilton@adc.com
| ADC| ADC Telecommunications, ATM Transport Division
|_____| Richardson, Texas
------------------------------
Date: 06 Sep 1998 00:52:06 -0400
From: Uri Guttman <uri@sysarch.com>
To: lr@hpl.hp.com (Larry Rosler)
Subject: Re: reading a file backward
Message-Id: <x7n28d2689.fsf@sysarch.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
LR> Obviously one must read the whole file in order to print it, but I don't
LR> think it need all be in memory at once as you imply. I just tossed the
LR> following off:
LR> #!/usr/local/bin/perl -w
LR> use strict;
LR> my (@offsets, $offset);
LR> my $file = $0; # for testing
LR> open IN, $file or die "Couldn't open $file. $!\n";
LR> do { push @offsets, tell IN } while <IN>;
LR> while (defined ($offset = pop @offsets)) {
LR> seek IN, $offset, 0 or die "Couldn't seek to $offset. $!\n";
LR> print scalar <IN>;
LR> }
LR> __END__
larry,
you keep inspiring me to come up with better solutions! keeps me on my
toes!
your method is good but why read the file twice? why not just scan from
the end of the file. here is some very loose pseudo code of the proposed
algorithm.
on start:
seek to end of file
seek back 1 block size
read in 1 block into buffer
LINELOOP:
scan buffer backwards for previous \n (rindex or regex to match last line)
if we have a line return line
if we are at seek position 0, return undef
seek back a block, read it in, prepend to buffer
next LINELOOP
this is fast, not too hard to code and efficient. it reads only a buffer
at a time and can work with any size file.
an optimization would be to read in blocks on file system block
boundaries. the last fragment block would be read in and then previous
blocks on their boundaries. also it could use sysopen and sysread
unless portability and other issues like handling exceptions are an
issue (see camel p. 229-230, sysread).
also as each block is read in, a list of lines positions could be
maintained which makes the calls to readline go faster. i don't know if
this would have any effect on the speed of reading the whole file in
backwards.
does anyone want to work with me on it to make a module out of it? i
need more moral support than coding help, but i am willing to share the
profits and glory! i do like the name IO::Handle::Backwards.
it would only support <> or readline or readlines. maybe eof needs to be
supported too.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 06 Sep 1998 00:39:23 -0400
From: Charles Maier <maierc@chesco.com>
Subject: Re: session id
Message-Id: <35F211FB.D6D2CD49@chesco.com>
Jonathan A. Laub wrote:
>
> i need to create a uniquely-named file for use with a clipper polling app.
>
> how does one obtain the "session id" for use in a perl script?
>
> Thanks,
>
> Jonathan
try
$id = $$;
--
Chuck Maier
CDM Consulting Services
http://www.cdmcon.com
(610) 942-2726
------------------------------
Date: Sat, 05 Sep 1998 20:35:10 +0200
From: "Jvrg Nieswand" <joerg.nieswand@leverkusen.netsurf.de>
Subject: wie Formular mit "CGI-BIN" verfeinern ?
Message-Id: <35F1845E.78996178@leverkusen.netsurf.de>
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------C1CC1C0C3621BA1689CFD91A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--------------C1CC1C0C3621BA1689CFD91A
Content-Type: text/plain; charset=iso-8859-1; name="martin.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="martin.txt"
hi alle zusammen,
ich besitze seit kurzem eine eigene Web-Adresse (inkl. CGI-BIN) und habe u.a. eine
Web Seite mit Formulareingabe ohne CGI-BIN erstellt. Das ganze funktioniert tadellos. Die
probeweise an mich selbst geschickten Formulare werden mir per "mailto:" als E-Mail
zugesandt. Leider bin ich mit dem Ergebnis nicht ganz zufrieden. Wenn ich mein Formular
ausfuelle und es an mich selbst probeweise schicke, erscheint folgendes Ergebnis als E-Mail:
----------------------------------------------------------------------------------------------
Firma=Test GmbH
Vor- und Zuname=Peter Mueller
Stra_e und Hausnummer=Friedrich-Engels-Allee 189
Ort=42699 Solingen
Telefon=123456 (privat)
Fax=78910
Kurzbeschreibung(en)=2 ZI. in Ohligs, 600 DM
2 Zi, 700 DM
5 Zi. 899 DM
Haus, 1.299 DM
---------------------------------------------------------------------------------------------
Nun ware es natuerlich schoen, wenn es einen CGI-Script gebe, der nach dem Abschicken des
Formulars sofort wieder zur Hauptseite "index.html" zuruckkehrt und vorher das Formular
als konvertierte E-Mail in Textdateiformat an mich weiterleitet:
----------------------------------------------------------------------------------------------Test GmbH
Peter Mueller
Friedrich-Engels-Allee 189
42699 Solingen
Telefon:123456 (privat)
Fax:78910
Erbitte Informationen ueber:
============================
2 ZI. 600 DM
2 Zi, 700 DM
5 Zi. 899 DM
Haus, 1.299 DM
---------------------------------------------------------------------------------------------
Ich habe mich schon auf diversen Web-Seiten umgeschaut aber bei den kryptischen Befehlen
von Perl bekomme ich einfach einen moralischen. Daher meine Frage: kennt jemand einen Script,
der genau das erzeugen kann? Bitte helft mir. Ich bin schon ganz verzweifelt. Bitte schickt
mir euer Antwort auch als E-Mail .........
Tausend Dank im voraus :-)))))))
--------------C1CC1C0C3621BA1689CFD91A--
------------------------------
Date: Sun, 06 Sep 1998 04:24:22 GMT
From: steele4life@my-dejanews.com
Subject: WWWBoard Questions
Message-Id: <6st2pm$d9b$1@nnrp1.dejanews.com>
1.)Does anyone know how to seperate the posts by day??? I mean all posts
will be seperated by A table that will have News For The Day it is(ex:
Monday).
2.)Does anyone know how to show the next5/prev5 links in a message posted in
wwwboard??
3.)Anyone know how to put the Eastern time in WWWBoard.?Instead of having the
server time.I want the time to be like 8:20p.m .
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Sun, 06 Sep 1998 04:32:58 GMT
From: steele4life@my-dejanews.com
Subject: WWWBoard Questions
Message-Id: <6st39q$dvo$1@nnrp1.dejanews.com>
1.)Does anyone know how to seperate the posts/messages by day??? All messages
are sperated by tables that have the day when they was posted in them.
2.)Does anyone know how to show the prev5/next5 messages posted links in a
message file in wwwboard??
3.)Anyone knows how to put Eastern time in the script and not the server
time???
Please help
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
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 3646
**************************************