[9165] in Perl-Users-Digest
Perl-Users Digest, Issue: 2783 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 1 20:07:27 1998
Date: Mon, 1 Jun 98 17:01:35 -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, 1 Jun 1998 Volume: 8 Number: 2783
Today's topics:
Re: perl for windows 3.1? (Jonathan Stowe)
Re: Perl Scripts (Jason Stephenson)
Re: Perl Scripts (Martien Verbruggen)
Re: Problem reading large files under Win95 jmhart@world.std.com
Re: require vs. use when, where, why, what... <tchrist@mox.perl.com>
Re: require vs. use when, where, why, what... <rootbeer@teleport.com>
Saving variable in $ENV{'REMOTE_USER'} <alcazar@netcomp.net>
String to hash utility anyone? <ewy@iti-oh.com>
String to Hash utilty anyone? <ewy@iti-oh.com>
Suggestions? DejaWank@my-dejanews.com
Re: Using perl to post a CGI form (Jonathan Stowe)
Win32 FTP <jbenenson@msn.com>
Re: Win32 FTP (Bob Trieger)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 01 Jun 1998 22:09:48 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: perl for windows 3.1?
Message-Id: <35732431.6892922@news.btinternet.com>
On Mon, 01 Jun 1998 10:07:07 GMT, Chris Wareham wrote :
<snip>
> I think full blown Perl support for Win3.1/DOS ended
>with Perl 4.036 - but then I'm a Unix weenie so what do I know?
>
aye,aye.
c:/develop> perl -v
This is perl, version 5.004_02
Copyright 1987-1997, Larry Wall
MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis
djgpp v2 port (jpl5003c) by Hirofumi Watanabe, 1996
djgpp v2 port (perl5004) by Laszlo Molnar, 1997
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5.0 source
kit.
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Mon, 01 Jun 1998 23:03:55 GMT
From: panda@mis.net (Jason Stephenson)
Subject: Re: Perl Scripts
Message-Id: <panda-0106981908130001@lexcas20.mis.net>
In article <3572A08D.85F25544@virgin.net>, Dan : Refresh Net
<daniel.fox@virgin.net> wrote:
> Steven Roka wrote:
>
> > I am new at this and would like to find a perl scripts library (ie i don't
> > understand the technical stuff), or even better a script that will email me
> > information filled in a form on a web page.
> > Steve
>
> YEAH! I need to know exactly the same stuff.
>
> Anybody know some good PERL resources on the web
At the risk of tooting my own horn, I've put together a page of links to
Perl stuff. It's a work in progress (as is everything on the web), but it
should get you started looking around.
http://jason.stephenson.net/perl.htm
------------------------------
Date: 1 Jun 1998 22:50:30 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
To: "Steven Roka" <rocka@infoserve.net>
Subject: Re: Perl Scripts
Message-Id: <6kvb7m$u3$1@comdyn.comdyn.com.au>
[Changed Newsgroups line to only include clp.misc, because most of
the originals were either inappropriate, or non-existent over here]
[Posted and Mailed]
In article <6ktem6$1ep$1@pugsley.tor.metronet.ca>,
"Steven Roka" <rocka@infoserve.net> writes:
> I am new at this and would like to find a perl scripts library (ie i don't
> understand the technical stuff), or even better a script that will email me
> information filled in a form on a web page.
The mother of all perl archives is CPAN:
http://www.perl.com/CPAN/
If you're looking for cgi scripts, you could give
http://www.cgi-resources.com/ a go.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd. | inexactitude.
NSW, Australia |
------------------------------
Date: Mon, 01 Jun 1998 22:53:39 GMT
From: jmhart@world.std.com
Subject: Re: Problem reading large files under Win95
Message-Id: <6kvbdj$bij$1@nnrp1.dejanews.com>
I have successfully processed large files (as large as the 5 Mb and 25 Mb
files you mentioned) under Windows 95 in programs that I've written.
Generally, my applications have processed the files sequentially, using
ReadFile and WriteFile. I have also used file mapping on files of this size.
I have also used the standard C library functions (fopen, fread, fwrite,
fclose) on the same large files.
Now, I have not tried large files with PERL. There might be issues with the
method that PERL uses, or the particular technique it usess.
Have your tried the same thing under Windows NT, just out of curiosity?
Regards,
John Hart
jmhart@world.std.com
In article <356ada4c.11370021@news.club-internet.fr>,
vasile@club-internet.fr wrote:
>
> Hello
>
> I have a problem with big files under Win95.
>
> The problem is that I can read only the first 4-5 Mb from the file (total
length is 25 Mb).
> It works well by splitting the file in some little files of 4 Mb.
>
> Is this a Perl limitation ? Or Win95 ? On Perl under Win95 ?
> Had anybody else this problem ? A solution ?
>
> Thanks,
>
> PS : I'm using Perl for Win32 "normal version" (not ActiveState) version
5.004_02
>
> - -
> Vasile Calmatui
> vasile@club-internet.fr
> http://www.chez.com/vasile/
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 1 Jun 1998 22:35:21 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: require vs. use when, where, why, what...
Message-Id: <6kvab9$lj5$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
mshannon@lds.com writes:
:Can anyone tell me what the difference is between use and require;
:when I should use one or the other; does use use @INC, and anything
:else a novice perl developer should need to know about them?
Succinctly:
1) do $file is like eval `cat $file`, except the former:
1.1: searches @INC.
1.2: bequeaths an *unrelated* lexical scope on the eval'ed code.
2) require $file is like do $file, except the former:
2.1: checks for redundant loading, slipping already loaded files.
2.2: raises an exception on failure to find, compile, or execute $file.
3) require Module is like require "Module.pm", except the former:
3.1: translates each "::" into your system's directory separator.
3.2: primes the parser to disambiguate class Module as an indirect object.
4) use Module is like require Module, except the former:
4.1: loads the module at compile time, not run-time.
4.2: imports symbols and semantics from that package to the current one.
--tom
--
Yield to Temptation ... it may not pass your way again.
--Lazarus Long, "Time Enough for Love"
------------------------------
Date: Mon, 01 Jun 1998 22:52:03 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: require vs. use when, where, why, what...
Message-Id: <Pine.GSO.3.96.980601155122.15370U-100000@user2.teleport.com>
On Mon, 1 Jun 1998, Mike Shannon wrote:
> Can anyone tell me what the difference is between use and require;
> when I should use one or the other; does use use @INC, and anything
> else a novice perl developer should need to know about them?
Once you've read the docs about them, if you still have questions, please
post again. Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 1 Jun 1998 14:03:21 -0500
From: "Ric Alcazar" <alcazar@netcomp.net>
Subject: Saving variable in $ENV{'REMOTE_USER'}
Message-Id: <e$xVr$Yj9GA.284@upnetnews02.moswest.msn.net>
Hello all,
Quick newbie question. When I save a value to the environment variable
"REMOTE_USER" how come that value returns nothing when I call it in a
separate pl script?
I've saved it like this:
sub check_login {
$ENV{'REMOTE_USER'} = $login;
}
Yet, when I use another script to call the environment variable it
returns nothing. I've tried a varied of things... like adding
require "scriptname.pl"
&check_login;
to the calling script, however that does nothing but give a 500 error.
I'm throroughly confused. Perhaps someone could help to shed a little light
on things. Thank you.
Ric
------------------------------
Date: Mon, 1 Jun 1998 17:57:19 -0400
From: "Eric Youngquist" <ewy@iti-oh.com>
Subject: String to hash utility anyone?
Message-Id: <6kv8c7$h5d$1@malgudi.oar.net>
(Forgive me if this is a repost. My first attempt resulted in an error)
I would like to convert a string to a hash where keys are created based on a
delimiter. Before I write it myself, I was wondering if it has already been
done before.
Basically, I have the following strings
"dir1/sdir1/sdir11/file11.txt"
"dir1/sdir2/file2.txt"
"dir1/sdir3/sdir33/sdir333/file333.txt"
and I would like to place them in a hash based on the delimiter "/":
$hash{dir1}{sdir1}{sdir11}=file11.txt
$hash{dir1}{sdir2}=file11.txt
$hash{dir1}{sdir3}{sdir33}{sdir333}=file333.txt
------------------------------
Date: Mon, 1 Jun 1998 17:54:43 -0400
From: "Eric Youngquist" <ewy@iti-oh.com>
Subject: String to Hash utilty anyone?
Message-Id: <6kv87b$gr7$1@malgudi.oar.net>
I would like to convert a string to a hash where keys are created based on a
delimiter. Before I write it myself, I was wondering if it has already been
done before.
Basically, I have the following strings
"dir1/sdir1/sdir11/file11.txt"
"dir1/sdir2/file2.txt"
"dir1/sdir3/sdir33/sdir333/file333.txt"
and I would like to place them in a hash based on the delimiter "/":
$hash{dir1}{sdir1}{sdir11}=file11.txt
$hash{dir1}{sdir2}=file11.txt
$hash{dir1}{sdir3}{sdir33}{sdir333}=file333.txt
------------------------------
Date: Mon, 01 Jun 1998 22:38:40 GMT
From: DejaWank@my-dejanews.com
Subject: Suggestions?
Message-Id: <6kvahg$9g6$1@nnrp1.dejanews.com>
I'm interested in building a cgi script that searches a simple flat file
database. The cgi doesn't need to write to or modify the file in any way. I
just want to query for matches in certain fields and return the matching
records as formatted lists in a frame. To be exact, I want to give the viewer
an opportunity to look for groups that can provide services for them. I'd like
to keep the number of fields they can search for to three (any or all fields).
I'd also like to embed HTML info in the database fields so formatting is
easier to keep consistent. My questions are these:
1. I have absolutely no experience with SQL or any kind of query language for
databases. Can I use Berkeley DB to hold the records? Is this a good database
application for keeping this simple database considering I'll be learning it
from scratch? The number of records will probably never exceed 2000.
2. Has anyone had experience with Sprite? I've read some about this and
although I've never used it, it seems pretty easy.
3. Does anyone have experience embedding HTML in database records? Or, is
there an elegant solution to automatically providing HTML code in returned
queries of databases other than embedding HTML in the records?
I am just beginning to learn Perl and have a *long* way to go. I have the
basic books (Learning Perl and Programming Perl) and I realize from the outset
that it'll be slow going for a while till I get my bearings. Lastly, are
there any really (overly?) documented scripts that I can step through
visually to get an idea of script flow and style. Whew! This is going to
take some time.
Thanks in advance.
Sean
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Mon, 01 Jun 1998 22:09:42 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Using perl to post a CGI form
Message-Id: <35730fe6.1897658@news.btinternet.com>
On 1 Jun 1998 08:05:56 GMT, CoRey wrote :
>Greetings>
>
>i recently stumbled upon
>http://babelfish.altavista.digital.com/cgi-bin/translate?
>
>which is a web interface which allows you to xlate between different
>romantic languages.
>
>I want a perl/shell script which will automate this for me. i'm
>going through e-zine's perl5 book, 1996, so I'm boning up on perl.
>I know how to use lynx -source http:.... to get the actual source to
>the said page...and I found the table which contains the parameters
>which get posted to the server, which control which lang. gets
>xlated into what.
>
DejaNews Right !
Subject: babelfish.altavista web client (enjoy)
From: opus@magibox.net (Brock Sides)
Date: 1998/03/23
Message-ID: <opus-2303981931200001@dave.magibox.net>
Newsgroups: comp.lang.perl.misc
Amusing.
/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sun, 31 May 1998 07:56:52 -0600
From: "Jim Benenson" <jbenenson@msn.com>
Subject: Win32 FTP
Message-Id: <#MGuyyJj9GA.181@upnetnews05>
Where can I get an ftp module for Win32, or a complete Net module? The best
I have been able to find have been circa 1994/5.
Thanks for your help,
Jim Benenson
------------------------------
Date: Mon, 01 Jun 1998 23:04:14 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: Win32 FTP
Message-Id: <6kvc46$942$3@ligarius.ultra.net>
[ posted and mailed ]
"Jim Benenson" <jbenenson@msn.com> wrote:
-> Where can I get an ftp module for Win32, or a complete Net module? The best
-> I have been able to find have been circa 1994/5.
use Net::FTP, if you have the standard win32 port of perl, you already have it
installed. The documentation explains it's functions pretty clearly.
HTH
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-320-9895
and hang up when somebody answers "
------------------------------
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 2783
**************************************