[6966] in Perl-Users-Digest
Perl-Users Digest, Issue: 591 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 9 14:23:26 1997
Date: Mon, 9 Jun 97 11:00:54 -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, 9 Jun 1997 Volume: 8 Number: 591
Today's topics:
Re: Bizarre error <rootbeer@teleport.com>
Re: Bizarre error <chilton@scci-ad.com>
Re: call "c" from "perl"? (Nathan V. Patwardhan)
Re: Displaying a Web Site Tree? (Kevin M Shortt)
Re: File locking (Peter Haworth)
Re: formmail.pl: Netscape Prompts for Save As; IE Wor (Bob)
Re: help on pipe to ftp connection (Kerry Schwab)
Re: help on pipe to ftp connection (Nathan V. Patwardhan)
Re: localtime(time) yelds year 97, not 1997. In all rea (Kerry Schwab)
Major perl problem <gcyriac@internetMCI.com>
Re: Major perl problem <flg@vhojd.skovde.se>
Re: Missing operator before 0? (Honza Pazdziora)
Re: Newbie: How do I write to an existing file. <merlyn@stonehenge.com>
Re: Newbie: How do I write to an existing file. (Kerry Schwab)
Re: Newbie: How do I write to an existing file. (Abigail)
Re: passwd command and perl data? <bryan@eai.com>
Re: PERL AND TELNET ( Thomas Lachlan XMS x4206 )
Re: PERL AND TELNET (Kerry Schwab)
Re: Perl Database (Which is better) (Kerry Schwab)
Premature end of script header <cwchiu@postprint.nl>
Print lines without new-line <bad@efogm.msd.ray.com>
Re: Print lines without new-line <merlyn@stonehenge.com>
Re: Printing Prime Numbers <merlyn@stonehenge.com>
Re: Printing Prime Numbers <eglamkowski@mathematica-mpr.com>
VISUAL BASIC 5 <statpier@vicnet.net.au>
Re: why won't 'print <<end_print...end_print' work? <chilton@scci-ad.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 9 Jun 1997 07:54:55 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Gene Johannsen <gej@spamalot.mfg.sgi.com>
Subject: Re: Bizarre error
Message-Id: <Pine.GSO.3.96.970609075257.23445A-100000@kelly.teleport.com>
On 8 Jun 1997, Gene Johannsen quoted perldiag:
> Bizarre copy of %s in %s
> (P) Perl detected an attempt to copy an internal value
> that is not copiable.
>
> Which brings me back to the question: What does this mean?
The fact that this isn't clearer in perldiag seems to be a documentation
bug. :-) Could you run perlbug to say so? Thanks!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Mon, 09 Jun 1997 11:39:30 -0500
From: Chris Hilton <chilton@scci-ad.com>
Subject: Re: Bizarre error
Message-Id: <339C31C2.6201DD56@scci-ad.com>
> | : I got this error from a script:
> |
> | : Bizarre copy of CODE in leavesub at /usr/asrs/mack.pl line 514
> |
> | : Line 514 of mack.pl looks like this:
> |
> | : return unless get_crane_status( &INBOUND_FULL ) == &YES;
> |
> | : Can anyone explain this to me?
> |
> |
> | You mean beyond the explanation of the error message that is given
> | in the perldiag man page?
>
> You mean this:
>
> Bizarre copy of %s in %s
> (P) Perl detected an attempt to copy an internal value
> that is not copiable.
>
> Which brings me back to the question: What does this mean?
>
> gene
My wild ass guess is that 'return unless ...' tried to return the
internal code for the 'unless' operation. Since return values are copies
of the original, and Perl knows not to copy code bits, so it threw up
that error. I'm further guessing that leavesub is the internal routine
that evaluates return values as you leave subroutines.
Again, these are all just guesses, I know next to nothing about the
internals of Perl.
My guessing aside, try 'return() unless ...' and see how that works.
--
Chris
Be seeing you.
------------------------------
Date: 9 Jun 1997 14:46:46 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: call "c" from "perl"?
Message-Id: <5nh50m$cjc@fridge-nf0.shore.net>
Jun Zhuang (jzhuang@ringer.cs.utsa.edu) wrote:
: Need help to understand how to call "C" from Perl.
Did you read perlxstut and perlxs? The code you provided didn't
seem to suggest that you did.
: I tried call a "C" executable from perl script?
Really? :-)
: i.e. a simple "S" program is:
: In the Perl script, I tried to call this program by using execvp:
Arggh. No need to do that.
Do it one of two ways (there are more ways to do this, but you'll have
to RTFM):
(1) system("program arg arg");
(2) use XS to write a .xs file with a C function in it, like the
examples found in the perlxstut manpage. The perlxs manpage
also tells you how to write the Makefile, etc.
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: 9 Jun 1997 15:16:12 GMT
From: shortt@acsu.buffalo.edu (Kevin M Shortt)
Subject: Re: Displaying a Web Site Tree?
Message-Id: <5nh6ns$a8b@prometheus.acsu.buffalo.edu>
Rick Barkhouse (rbarkhou@rc.gc.ca) wrote:
: Does anyone know of a program or script (preferably in Perl) that I can
: use on our Unix web server to give a tree-like display of the web site?
: It would take an index file and recursively branch off with each local html
: file it finds referenced.
:
try Expander.cgi....try demo at:
http://smurfland.cit.buffalo.edu/Sware/Expander/Expander.cgi
download it at:
http://smurfland.cit.buffalo.edu/Sware/Expander/index.html
HTH
-kevin
------------------------------
Date: 9 Jun 1997 16:02:57 GMT
From: pmh@ioppublishing.com (Peter Haworth)
Subject: Re: File locking
Message-Id: <5nh9fh$fi3$1@newton.ioppublishing.com>
In article <01bc7294$20ef2100$1f8493cf@brooks.st.hmc.edu>,
"Brooks Davis" <brooks-n-janet@worldnet.att.net> writes:
> Gordon Hunt <flash@webfresco.com> wrote in article
> <33975BA3.2181@webfresco.com>...
>> Can anyone help me with file locking under Solaris. flock() doesn't
>> work.
>
> What versions of Solaris and Perl are you using? With Solaris 2.5.1 and
> Perl 5.003 the following code snipit will give you an exclusive lock
>
> open(LOCKFILE, ">$lockfile") || die "Could not open lockfile: $!";
> flock LOCKFILE, 2; # Get an exclusive lock on the lock file.
Unfortunately, under perl 5.003 you'll also get an exclusive lock if you
ask for a shared lock.
For this to work as you'd expect under Solaris 2.x, you need to upgrade to
perl 5.004.
Peter
--
Peter Haworth pmh@edison.ioppublishing.com
The art of working is to do as little as possible
in the most industrious way imaginable.
------------------------------
Date: Mon, 09 Jun 1997 17:28:36 GMT
From: xxbbell@voicenet.com (Bob)
Subject: Re: formmail.pl: Netscape Prompts for Save As; IE Works Fine
Message-Id: <5nhef6$qm6$1@news1.voicenet.com>
If this were a UNIX server running Apache, I would say that
you need to configure the server to recognize .pl as an extension to a
CGI file. Otherwise, the server just returns the code, instead of
executing it. I assume something similar for your WinNT & IIS. Ask
the question in a newsgroup for that software.
tbrennan@javanet.com wrote:
>Dear Perl Gods...This is a deparate prayer for Help...I'm trying to use
>Matt's formmail script with WinNT & IIS. He's got a version of the
>script on his site that he claims has been ported to run on Win32. As per
>the instructions on his site for using the script on Win32, I've
>downloaded and installed the program Windmail (as a UNIX SendMail
>substitute???).In Matt's and WindMail's instructions, there's no mention
>of theprogram "Blat," but I read someplace that the whole configuration
>needs this utility to work properly, so I've also managed to get Blat
>installed on my server.I've edited the registery to include a key for .pl
>as instructed and I've added the appropriate switches to the key. I've
>also tried to run the script was a ".pl?" extension cause I saw a Usenet
>posting that recommended this, but still no luck!!I've also given the
>proper EXECUTE AND READ permissions to the IUSER account for the
>appropriate directories as per instructed.***Matt's script works great
>with IE and does everythingthat it needs to do.***However, when I hit the
>Submit button on the same form with the Netscapebrowser, I get prompted
>with the Save As dialog, and it wants me (and other site visitors) to
>download the script (formmail.pl)! YUCK! I suspect that is has to do
>with MIME type or Perl headers and the configuration as to how Netscape
>handles em. Trouble is I'm clueless as to Perl syntax and how to edit
>them.BTW, I got an alternative script to work with both browsers
>at:http://www.digitaldelivery.com/cupage.html***But I really want to use
>Matt's!The location of the faultly script (the one that doesn't work with
>Netscape) is at:http://www.digitaldelivery.com/cupage10.html If you
>please respond to me at tbrennan@javanet.com, I would be forever
>grateful. Thanks in advance. Tammy tbrennan@javanet.com
>
>-------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
--
- Bob
http://www.voicenet.com/~bbell
xxbbell@voicenet.com
remove x's to reply
------------------------------
Date: 9 Jun 1997 05:50:10 -0600
From: kschwab@nyx10.cs.du.edu (Kerry Schwab)
Subject: Re: help on pipe to ftp connection
Message-Id: <5ngqli$gbt@nyx10.cs.du.edu>
In article <19970609055001.BAA21387@ladder02.news.aol.com>,
Dgenius1 <dgenius1@aol.com> wrote:
>help anyone....
>am opening a pipe to an ftp connection by:
>open(FTP, ">ftp -i $rhost") || die ....;
> ...
>...
>...
>
>print FTP "put $file_name";
>
>the connection works but, it doesn't seem to transfer
>the whole file. it doesn't matter what the size of the file
>is. i've tried from 19k to 5mb files. it just doesn't
>transfer the whole file. any suggestions anyone ???
>
>any response would be appreciated...
>please also email response to amanayan@fritz.com
>
>tx:))
>
Looking at the output from /bin/ftp might help...
Using the correct syntax to open a process would help even more ;)
Frankly, I'm not sure how it transferred any bytes at all, it looks
to me like you are just printing commands to a file.
$LOG="/tmp/ftplog$$";
open(FTP,"|ftp -iv >> $LOG 2>&1") || die;
#
# note the '|' instead of the ">", and the -v switch to make ftp run
# verbose without a tty
#
--
Kerry
------------------------------
Date: 9 Jun 1997 15:09:03 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: help on pipe to ftp connection
Message-Id: <5nh6af$cjc@fridge-nf0.shore.net>
Kerry Schwab (kschwab@nyx10.cs.du.edu) wrote:
: In article <19970609055001.BAA21387@ladder02.news.aol.com>,
: Dgenius1 <dgenius1@aol.com> wrote:
: >help anyone....
: >am opening a pipe to an ftp connection by:
: >open(FTP, ">ftp -i $rhost") || die ....;
Why are you doing it this way, anyhow? What's wrong with using
Net::FTP?
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: 9 Jun 1997 06:08:42 -0600
From: kschwab@nyx10.cs.du.edu (Kerry Schwab)
Subject: Re: localtime(time) yelds year 97, not 1997. In all realizations?
Message-Id: <5ngroa$hfc@nyx10.cs.du.edu>
In article <01bc742c$5279d370$08c8c8c8@paf>,
Alexander Petrosyan (PAF) <paf@i-connect.ru> wrote:
>That's true for 5.001NT port, and, as far as I've heard for 5.004 unix.
>
>Why?
>What whould be when in 2000?
>
>
>--
>Alexander Petrosyan, Moscow.
>email: paf@i-connect.ru, paf@fbit.msk.su
>phone: +7(095)535-2222
Read the docs...
localtime EXPR
Converts a time as returned by the time function to a 9-
element array with the time analyzed for the local time zone.
Typically used as follows:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
All array elements are numeric, and come straight out of a
struct tm. In particular this means that $mon has the range
0..11 and $wday has the range 0..6 and $year is year-1900,
that is, $year is 123 in year 2023. If EXPR is omitted, uses
the current time ("localtime(time)").
So in the year 2000, it will come back as 100...
--
Kerry
------------------------------
Date: 9 Jun 1997 13:02:40 GMT
From: "Negative Creep" <gcyriac@internetMCI.com>
Subject: Major perl problem
Message-Id: <01bc74d5$2c8c9cc0$994837a6@cyriac>
I just made a script that opens a file and writes one email to it. Then it
redirects the page, everything works fine but it doesn't write to the file.
There are no error messages it redirects and everything. Perl should give
an error if it can't write to a file. Here is the script, I've spent an
hour trying to figure out why it won't write, please help me:
#BEGIN SCRIPT
#!/usr/bin/perl
# Get the input
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<([^>]|\n)*>//g;
$value =~ s/<//g;
$value =~ s/>//g;
$FORM{$name} = $value;
}
$email = $form{'email'};
open(FILE,">>/mnt/web/guide/mav/nc/dvdepot/emails.txt");
print FILE "$email\n";
close(FILE);
print "location: http://mav.net/nc/dvdepot/thankyou.html\n\n";
#END SCRIPT
I didn't use the end/begin script in the real file. The is a legitameant
perl script. It should work on any server after naming it .cgi and modding
the file to 755. WHAT IS WRONG, I AM SO FRUSTRATED.!
--
--------------------------------------------
Negative Creep
http://mav.net/nc/
Less is more, love is blind
--------------------------------------------
------------------------------
Date: 9 Jun 97 13:52:14 GMT
From: "Fredrik Lindberg" <flg@vhojd.skovde.se>
Subject: Re: Major perl problem
Message-Id: <01bc74dc$4dedf9c0$e20f10c2@odens.di.vhojd.skovde.se>
Negative Creep <gcyriac@internetMCI.com> wrote in article
<01bc74d5$2c8c9cc0$994837a6@cyriac>...
> I just made a script that opens a file and writes one email to it. Then
it
> redirects the page, everything works fine but it doesn't write to the
file.
> There are no error messages it redirects and everything. Perl should
give
> an error if it can't write to a file.
> open(FILE,">>/mnt/web/guide/mav/nc/dvdepot/emails.txt");
> print FILE "$email\n";
> close(FILE);
Well Perl will not print any error messages unless you say so.
Change the open line to something like this:
open(FILE,">>/mnt/web/guide/mav/nc/dvdepot/emails.txt") or die("Error:
$!\n");
This should print an error message to STDERR if open() fails. Try it as a
standalone
script.
/Fredrik
------------------------------
Date: Mon, 9 Jun 1997 13:48:31 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Missing operator before 0?
Message-Id: <adelton.865864111@aisa.fi.muni.cz>
Ralf Naegele <naegele@she.de> writes:
> With same perl scripts I get the following message:
>
> Number found where operator expected at (eval 173) line 1, near ") 0"
> (Missing operator before 0?)
>
> Line 1 looks like
> #!/usr/bin/perl
I'm affraid, you need to give us the first line or the 173rd eval in
your script. That's where the problem is.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
Have you done your DES today? --> http://www.des.sollentuna.se/
------------------------------
Date: 09 Jun 1997 06:26:12 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: Newbie: How do I write to an existing file.
Message-Id: <8coh9fdi17.fsf@gadget.cscaper.com>
>>>>> "Thomas" == Thomas Lachlan XMS x4206 <etltsln@etlxd30.ericsson.se> writes:
Thomas> `/bin/mv /tmp/tmpfile /path/filename`;
Ouch. Please don't. This line would be considered "bad style" for
two reasons:
(1) use of `command` in a void context (where you aren't using the return
value) means that Perl goes to some extra work to capture the output,
just to throw it away. The proper form looks like:
system "/bin/mv", "/tmp/tmpfile", "/path/filename";
(2) however, in this case, we don't even need to fork a process to do
the rename, since perl has a built-in "rename" operator:
rename "/tmp/tmpfile", "/path/filename";
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 449 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 9 Jun 1997 08:05:33 -0600
From: kschwab@nyx10.cs.du.edu (Kerry Schwab)
Subject: Re: Newbie: How do I write to an existing file.
Message-Id: <5nh2jd$rsh@nyx10.cs.du.edu>
In article <8coh9fdi17.fsf@gadget.cscaper.com>,
Randal Schwartz <merlyn@stonehenge.com> wrote:
>>>>>> "Thomas" == Thomas Lachlan XMS x4206 <etltsln@etlxd30.ericsson.se> writes:
>
>Thomas> `/bin/mv /tmp/tmpfile /path/filename`;
>
>Ouch. Please don't. This line would be considered "bad style" for
>two reasons:
>
>(1) use of `command` in a void context (where you aren't using the return
>value) means that Perl goes to some extra work to capture the output,
>just to throw it away. The proper form looks like:
>
> system "/bin/mv", "/tmp/tmpfile", "/path/filename";
>
>(2) however, in this case, we don't even need to fork a process to do
>the rename, since perl has a built-in "rename" operator:
>
> rename "/tmp/tmpfile", "/path/filename";
>
Ouch! :)
Using rename in a void context, without testing the return value
could be dangerous. (With the probably valid deduction that /tmp
and /path are different filesystems.)
Actually, I just wanted to plug File::move from the FileUtils package.
(Which seems to be included in 5.004)
--
Kerry
>print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
>## legal fund: $20,495.69 collected, $182,159.85 spent; just 449 more days
>## before I go to *prison* for 90 days; email fund@stonehenge.com for details
>
>--
>Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
>Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
>Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
>Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
>Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Mon, 9 Jun 1997 15:56:59 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Newbie: How do I write to an existing file.
Message-Id: <EBIMyz.AwL@nonexistent.com>
Randal Schwartz (merlyn@stonehenge.com) wrote on 1378 September 1993 in
<URL: news:8coh9fdi17.fsf@gadget.cscaper.com>:
++
++ (2) however, in this case, we don't even need to fork a process to do
++ the rename, since perl has a built-in "rename" operator:
++
++ rename "/tmp/tmpfile", "/path/filename";
Not long ago I went through some old scripts (scripts I didn't
write myself) and changed all the system "mv file1 file2" to
rename "file1", "file2".
Suddenly, the scripts failed to work.
rename cannot move files over filesystems, while (at least on
Solaris) /bin/mv can. Rename() isn't always as powerful as /bin/mv.
Abigail
--
perl5.004 -wMMath::BigInt -e'$=new Math::BigInt+qq;$$783$[$%9889$47$|88768$596577669$%$5$3364$[$$$|838747$[8889739$%$|$673$%$98$76777$=56;;$=$]*(q.25..($=@))=>do{print+chr$%$;$/=$}while$!=$'
------------------------------
Date: Mon, 09 Jun 1997 11:22:40 -0500
From: Bryan Hart <bryan@eai.com>
To: Eric Harley <erich@powerwareintl.com>
Subject: Re: passwd command and perl data?
Message-Id: <339C2DD0.794B@eai.com>
Eric Harley wrote:
>
> How would I pipe data into the passwd(1) command on a BSD box?
>
> Do i just open it like a file handle?
>
> open PAS, "| passwd $user";
>
> print PAS "$oldpass";
> print PAS "$newpass";
> print PAS "$secondpass";
>
> Thanks!
> -Eric Harley
> erich@powerwareintl.com
Close, try:
open PAS, "| passwd $user";
print PAS "$oldpass\n";
print PAS "$newpass\n";
print PAS "$secondpass\n";
close PAS;
or
open PAS, "| passwd $user";
print PAS <<EOM;
$oldpass
$newpass
$secondpass
EOM
close PAS;
Depending on how buffering is handled, it might not work correctly w/o
the close().
Bryan
--
-------------------------------
| Bryan Hart
| Network Products Engineer
| Engineering Animation Inc.
| Phone: (515) 296-5979
| Fax: (515) 296-7025
| Email: bryan@eai.com
| Web: http://www.eai.com/
-------------------------------
"A conclusion is simply the place where you got tired of thinking"
------------------------------
Date: 9 Jun 1997 11:35:58 GMT
From: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: PERL AND TELNET
Message-Id: <5ngpqu$btd@newstoo.ericsson.se>
CAD-VISIOGRAPH (visiocad@easynet.fr) wrote:
: can I execute a Telnet with PERL and giving automaticaly the username and
: the password ?
I don't know. However I use Expect or Wish scripts which can
carryout this type of interaction. Check your man pages for
further info.
Regards Tam
------------------------------
Date: 9 Jun 1997 06:02:00 -0600
From: kschwab@nyx10.cs.du.edu (Kerry Schwab)
Subject: Re: PERL AND TELNET
Message-Id: <5ngrbo$h35@nyx10.cs.du.edu>
In article <01bc74c2$aa397160$3c5c72c3@visiocad.easynet.fr>,
CAD-VISIOGRAPH <visiocad@easynet.fr> wrote:
>can I execute a Telnet with PERL and giving automaticaly the username and
>the password ?
>
>
>
Have a look at the Net::Telnet module, the IPC/open[2|3] routines, or
Comm.pl.
I'm reasonably sure there's something about this in the FAQ...
--
Kerry
------------------------------
Date: 9 Jun 1997 05:54:16 -0600
From: kschwab@nyx10.cs.du.edu (Kerry Schwab)
Subject: Re: Perl Database (Which is better)
Message-Id: <5ngqt8$gmo@nyx10.cs.du.edu>
In article <339BCC77.5215@mci2000.com>,
Howard Yen <howard.yen@mci2000.com> wrote:
>I need to develop a site that will have hundreds of thousands
>of users. Currently the site is done using Perl.
>
>Which of these 3 is the best way to go, in terms of speed,
>expandability and using the least memory.
>
>1. Msql
>2. DB_File
>3. Sprite
>
>hy
This is a difficult question to answer without knowing what you are doing.
Msql is fast for an sql based database, but would certainly be slower than
DB_File for a simple hash lookup.
Do you need msql's features, or will the simple "one key", "one val" idea
of a DBM type file suffice ?
--
Kerry
------------------------------
Date: 9 Jun 1997 15:43:42 GMT
From: "C.W. Chiu" <cwchiu@postprint.nl>
Subject: Premature end of script header
Message-Id: <01bc74ec$85957640$a25fa5c2@denp>
Can anybody tell what this means?
If the script is running from the command line it works well
if i call it from my browser i get this message in my error_log file
Chi Wang Chiu
cwchiu@postprint.nl
------------------------------
Date: Fri, 06 Jun 1997 14:07:28 -0500
From: "Brian A. Duncan" <bad@efogm.msd.ray.com>
Subject: Print lines without new-line
Message-Id: <33985FF0.42C5@efogm.msd.ray.com>
How can I print a text string without having to end it in a new-line?
Is there an option I can use that is similar to the "echo \c" shell
command?
Here's a short example of what I want to do:
print "This is text...";
for $arg (@args) {
print "more text...";
}
I want this output: "This is text...more text...more text..." etc...
Thanks.
--
Brian A. Duncan
Raytheon Company
353 James Record Road
Huntsville, AL 35824
bad@efogm.msd.ray.com
--------------------------------------------------------------
------------------------------
Date: 09 Jun 1997 06:49:39 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: bad@efogm.msd.ray.com
Subject: Re: Print lines without new-line
Message-Id: <8ck9k3dgy4.fsf@gadget.cscaper.com>
>>>>> "Brian" == Brian A Duncan <bad@efogm.msd.ray.com> writes:
Brian> How can I print a text string without having to end it in a new-line?
Brian> Is there an option I can use that is similar to the "echo \c" shell
Brian> command?
Brian> Here's a short example of what I want to do:
Brian> print "This is text...";
Brian> for $arg (@args) {
Brian> print "more text...";
Brian> }
Brian> I want this output: "This is text...more text...more text..." etc...
Hmm. Did you actually try the code you posted? Because that's
exactly what you would get!
:-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 449 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 09 Jun 1997 06:21:05 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: abigail@fnx.com
Subject: Re: Printing Prime Numbers
Message-Id: <8craebdi9q.fsf@gadget.cscaper.com>
>>>>> "Abigail" == Abigail <abigail@fnx.com> writes:
Abigail> Uhm, it took 63s on my sparc, vs 17s for my list implementation.
Abigail> Simple analysis shows your solution is real bad, and doesn't scale
Abigail> well at all. [1]
<HOMER>Dooooooh!</HOMER>
Ugh. Well, I guess this fits into one of those "occasionally incorrect
spatterings" that my Camel/Llama author bio references. :-)
OK. Ignore me.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 449 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Mon, 09 Jun 1997 11:30:15 -0400
From: the count <eglamkowski@mathematica-mpr.com>
Subject: Re: Printing Prime Numbers
Message-Id: <339C2187.6F0A@mathematica-mpr.com>
Darryl Caldwell wrote:
> The result is below. Essential it first prints out 1 since we know that
> it a prime number, then it discards even numbers. Next, it runs a series
> of tests on the remain odd numbers.
Don't forget 2! It is a prime number,
It is, however, the *only* even prime number.
If you are really interested in this sort of thing, there are
a variety of math books that should cover the topic quite nicely.
There are equations you can use to generate primes, but I don't
remember any of them off the top of my head ;)
------------------------------
Date: Mon, 09 Jun 1997 21:41:43 +1000
From: roger adams <statpier@vicnet.net.au>
Subject: VISUAL BASIC 5
Message-Id: <339BEBF7.977E41CC@vicnet.net.au>
How do i include a perl script in a vb5 program under windows 95 with
the perl interpreter
thank you
------------------------------
Date: Mon, 09 Jun 1997 10:56:11 -0500
From: Chris Hilton <chilton@scci-ad.com>
Subject: Re: why won't 'print <<end_print...end_print' work?
Message-Id: <339C279B.31DFF4F5@scci-ad.com>
Will Sexton wrote:
>
> If I do the following:
>
> print <<"end_print";
> some text
> some text on the next line
> end_print
>
> my (multiple) sources tell me the program should print the text, without
> having to set the print command for each new line (said sources lacking
> further explanation). But when I try it, I get an error message ("Can't
> find string terminator "end_print" anywhere before EOF at <progname>
> line <line number>.") And can't find feature documented among usual
> suspects (camel, llama, etc.).
>
> Why won't it work?
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> Will Sexton wise2@mindspring.com
> UNC-CH/Info Sci sextw@ils.unc.edu
p.43, 2nd Edition Camel book.
Be sure that 'end_print' has no surrounding white space (like the tab
you used above). It must appear by itself on the line.
--
Chris
Be seeing you.
------------------------------
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 591
*************************************