[6492] in Perl-Users-Digest
Perl-Users Digest, Issue: 117 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 14 11:27:43 1997
Date: Fri, 14 Mar 97 08:00:28 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 14 Mar 1997 Volume: 8 Number: 117
Today's topics:
[Q]: Problems with .pag files (Consultant - Murphy 97)
Re: can $_ be dissociated from its contents? (Chip Salzenberg)
Re: db_file/irix6.2/perl5 (Neil Bowers)
Re: flock() problem (Lutz Albers)
HELP ! Can't use modules (Nicolas DURAND)
Re: Help: Regular Expression (Tad McClellan)
Re: initialization problem and segmentation fault <dehon_olivier@jpmorgan.com>
Re: initialization problem and segmentation fault (Dave Thomas)
Re: initialization problem and segmentation fault <rootbeer@teleport.com>
Re: MacPerl5 <eike.grote@theo.phy.uni-bayreuth.de>
Re: Math with lists?? <fawcett@nynexst.com>
Perl 5.003 Install Question: Install without compiler? <chapman@techctr.buddcompany.com>
Re: Perl Browser <rootbeer@teleport.com>
Re: perl religion (was: Re: Which one is the best (patt (Markus Laker)
Re: Perl that FTP's a file? <d.j.evans@rdg.ac.uk>
Re: Perl5.003 for SCO?? (John Prideaux)
Please help an AutoLoad newbie (Thomas Rock)
Re: Preventing multiple copies of a script from running (Dave Thomas)
Re: random perl core dumps with obscure message (Ilya Zakharevich)
Reg Ex help (Fred Fenimore)
Re: Reg Ex help (Dave Thomas)
Re: remote to remote ftp from cgi (Clay Irving)
Re: Scripts to parse common server logs (Neil Bowers)
Re: We've baffled tech support, now on to Usenet... (brian d foy)
Re: We've baffled tech support, now on to Usenet... (Tad McClellan)
Re: Who makes more $$ - Windows vs. Unix programmers? <nickle@calfp.co.uk>
Re: Why don't this helpful suggestions work? <msouth@shodor.org>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 14 Mar 1997 10:13:55 -0500
From: "Thomas Valley; (Consultant - Murphy 97)" <mystery@itis.com>
Subject: [Q]: Problems with .pag files
Message-Id: <33296B33.167E@itis.com>
Hi,
I've got a problem. I've got a block of code that is saving a bunch of
data (115 records) to a database. I'm using dbmopen/dbmclose (yea, I
know, use tie/untie...I will, if it solves my problem) to access the
hash of records.
Unfortunately, even though these 115 records each never go above 900
characters in length (total length = combo length of key and value), the
file size has erupted into 20MB-30MB. Given that records cannot exceed
the 1024 ndbm barrier, this is implying that I have at least 20000
records.
I have confirmed the size of the database by:
@dbkeys = keys %dbfile;
print $#dbkeys;
Thanks for your help.
Thomas
------------------------------
Date: 14 Mar 1997 16:35:07 GMT
From: chip@rio.atlantic.net (Chip Salzenberg)
Subject: Re: can $_ be dissociated from its contents?
Message-Id: <5gbunr$fo@news.atlantic.net>
According to c.c.eiftj@66.usenet.us.com (Rahul Dhesi):
>In <5g7f7d$8l@news.atlantic.net> chip@rio.atlantic.net (Chip Salzenberg) writes:
>> $x = \ eval { $_ };
>
>$x becomes a reference to the value returned by the block { $_ }, but is
Oh, I see; I answered the wrong question. Do this instead:
$x = \$_; # get reference to original value
*_ = \ eval { '' }; # make $_ refer to a new empty string
Sorry for the misunderstanding.
--
Chip Salzenberg - a.k.a. - <chip@atlantic.net>
"Vacation time. Families travel east, west, north, or south."
"Some just burrow straight down." -- Crow T. Robot // MST3K
------------------------------
Date: Fri, 14 Mar 1997 14:59:44 GMT
From: neilb@cre.canon.co.uk (Neil Bowers)
Subject: Re: db_file/irix6.2/perl5
Message-Id: <E71GBK.JME@cre.canon.co.uk>
In comp.lang.perl.misc Jon Drukman <jsd@cyborganic.com> wrote:
: however, when i go to build perl, here's what happens:
: [...]
: when it gets to compile the DB_File package, it gives a billion
: errors about conflicting types.
If you look in the include/ directory relative to the source directory
where you were compiling DB (i.e. somewhere in the PORT directory),
you'll find cdefs.h. This needs to go somewhere where perl will find
it as sys/cdefs.h, preferably in the same include directory as db.h.
I.e.:
..../include/
db.h
..../include/sys/
cdefs.h
neilb
--
It is the friends you can call at 4am that matter.
-- Marlene Dietrich
------------------------------
Date: Fri, 14 Mar 1997 10:11:20 +0100
From: lutz@muc.de (Lutz Albers)
Subject: Re: flock() problem
Message-Id: <lutz-ya023480001403971011200001@news>
In article <8c7mjdi3yj.fsf@gadget.cscaper.com>, Randal Schwartz
<merlyn@stonehenge.com> wrote:
>Just consider flock(BLAH, 8) to NOT EXIST.
>
>(For those that want to know, the problem with releasing the lock
>first is that someone else can get the flock *before* your buffer
>flushes. Ouch.)
Wait a minute. Do I understand this correct: perl isn't flushing the file
buffer before it releases the lock ? Then I would call this a mayor bug :-)
Or is there a problem with the underlying OS locking mechamisms ?
Just curious ...
lutz
--
Lutz Albers, lutz@muc.de
Do not take life too seriously, you will never get out of it alive.
------------------------------
Date: Fri, 14 Mar 1997 14:39:58 +0100
From: ndurand@araxe.fr (Nicolas DURAND)
Subject: HELP ! Can't use modules
Message-Id: <ndurand-1403971439580001@mac.araxe.fr>
Whenever I try to use module with the "use" instruction, I have a core
dumped message.
For example, the following script doesn't work and generate a core dumped :
#!/usr/local/bin/perl
use Mail::POP3Client;
$pop = new Mail::POP3Client("login", "pass", "host");
for ($i = 1; $i <= $pop->Count; $i++) {
print $pop->Head($i), "\n";
}
My perl version is 5.003 on Aix 4.1.4
Thanks for your help.
------------------------------
Date: Fri, 14 Mar 1997 07:40:46 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Help: Regular Expression
Message-Id: <ugkbg5.am.ln@localhost>
Victor Tolbert (vtolbert@mindspring.com) wrote:
: I'm new to Perl and Regular Expressions and would appreciate any help with
: the following:
: I have a Eudura Email file which includes approximately 150 database
: entries in it. Essentially in the following format:
[ snip example records, see them in the sample script below ]
: I would like to create a regular expression to extract the name and email
: addresses an put it in a pipe delimited format like this.
:
: Julie Jackson|jacksj8@mail.place.edu
: Michael Williams|Mic.Will@abc.com
: ...
: What I have created so far gives me the following result.
: |Julie Jackson
: |jacks8@mail.place.edu
: |Michael Williams
: |Mic.Will@abc.com
: ...
: Using
: #!/usr/bin/perl
: open(MAILLIST, maillist);
: while(<MAILLIST>) {
: if(s/Name:\s*|Email:\s*/|/g) {
: print $_;
: }
: }
: ....
The script below depends on Name coming before its corresponding
Email field.
You didn't say, so I will assume that the fields are always in
the same order within a record.
------------------------
#!/usr/bin/perl -w
while (<DATA>) {
next unless s/^(Name|Email):\s*//; # only interested in Name & Email fields
# also remove the field label from $_
chomp; # remove the newline
if ( $1 eq 'Name' )
{ $out_line = $_ } # remember the Name
else
{ print "$out_line|$_\n" } # print the Name and Email
}
__DATA__
Header stuff blah, blah blah
Name: Julie Jackson
Company: Corp
Address: 412 Opelika Road Apt.111
Place, AL 36830
Work: 334-502-4545
Home:
Email: jacksj8@mail.place.edu
Comments:
Header
Name: Michael Williams
Company: ABC Company
Address: 2009 Any Street
Norcross, GA 30093
Work: 404-434-0987
Home: 770-123-5677
Email: Mic.Will@abc.com
Comments:
...
+++++
------------------------
: Thanks for any assistance.
Hope this helps!
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 14 Mar 1997 15:37:02 +0100
From: Olivier Dehon <dehon_olivier@jpmorgan.com>
Subject: Re: initialization problem and segmentation fault
Message-Id: <njz4teeleup.fsf@jpmorgan.com>
csutr@csv.warwick.ac.uk (Mr J K Tan) writes:
>
> #!/usr/local/bin/perl -w
>
> [....]
>
> sub listString {
> local(@l) = @_;
> local($temp) = NULL;
> foreach $i (0..4) {
> $temp .= $l[$i];
> }
> $temp;
> }
>
> I have a subroutine as above. But the interpreter keeps
> complaining that I use uninitalized value for $temp.
> How can I avoid this ? Here is the warning message :
>
> Use of uninitialized value at big2.pl line 33.
> Use of uninitialized value at big2.pl line 33.
>
> Also IS this the way to get the scalar value (the content)
> of an array ? Hope to get a better method.
It seems that you get confused between C and Perl.
I don't quite understand "the scalar value of an array".
$num_of_items = @array; # Is this what you want ???
Maybe you think that strings are handled as arrays in Perl, like in C ?
It's not the case. Strings are scalar values.
$my_string = "Hello world !";
An array is a collection of scalar values.
If your intention was to return a string that is a concatenation of the first
five elements of an array, you could simply do :
$result_string = join('', @l[0..4]);
In any case, you'd better read through the Perl documentation and FAQs.
Look at http://www.perl.com/CPAN/docs
Hope this helps.
Olivier Dehon
------------------------------
Date: 14 Mar 1997 14:59:21 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: initialization problem and segmentation fault
Message-Id: <slrn5iipu6.2lr.dave@fast.thomases.com>
On 14 Mar 1997 12:07:00 -0000, Mr J K Tan wrote:
>
> #!/usr/local/bin/perl -w
>
> [....]
>
> sub listString {
> local(@l) = @_;
> local($temp) = NULL;
> foreach $i (0..4) {
> $temp .= $l[$i];
> }
> $temp;
> }
1. 'NULL' will be taken to be the string 'NULL'. Is that what you want.
2. Unless you're using Perl4, look at using 'my' rather than 'local'.
3. If you don't want spaces in the result, then you could replace your
routine with
my $string = join('', @array);
4. If you want spaces between, then
my $string = "@array";
does the trick
Dave
--
_________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Fri, 14 Mar 1997 07:34:38 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Mr J K Tan <csutr@csv.warwick.ac.uk>
Subject: Re: initialization problem and segmentation fault
Message-Id: <Pine.GSO.3.96.970314072853.15346D-100000@kelly.teleport.com>
On 14 Mar 1997, Mr J K Tan wrote:
> sub listString {
> local(@l) = @_;
> local($temp) = NULL;
What's 'NULL'? Did you mean '0'? (And you should probably be using 'my'
instead of 'local'.)
> foreach $i (0..4) {
Why '0..4'? Do you intend for this to always be passed exactly five
parameters?
> $temp .= $l[$i];
> }
> $temp;
> }
Hmmm... It looks to me as if you're simply concatenating the parameters.
Does this do what you want? Although I wouldn't make it a sub... :-)
sub listString { join '', @_ }
> Subject: initialization problem and segmentation fault
So, where is the initialization problem and where is the segfault? :-)
Hope this helps!
-- 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: Fri, 14 Mar 1997 15:31:33 +0100
From: Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>
Subject: Re: MacPerl5
Message-Id: <33296145.2F1C@theo.phy.uni-bayreuth.de>
Hi,
Carl Joel Kuzmich wrote:
>
> Does it require a PowerPC and if not do you know were I can obtain the
> MAC version?
Take a look at the following sites to gather information about
MacPerl:
http://www.iis.ee.ethz.ch/~neeri/macintosh/perl.html
http://mors.gsfc.nasa.gov/MacPerl.html
Bye, Eike
=====================================================================
Eike Grote, Theoretical Physics IV, University of Bayreuth, Germany
email : eike.grote@theo.phy.uni-bayreuth.de
URL : http://www.phy.uni-bayreuth.de/~btpa25/
=====================================================================
------------------------------
Date: 14 Mar 1997 08:38:31 -0500
From: Tom Fawcett <fawcett@nynexst.com>
Subject: Re: Math with lists??
Message-Id: <8jwwray4o8.fsf@nynexst.com>
"Chris Morrow" <morrowc@mrj.com> writes:
> I have a question:
> Can you add 2 lists together and them remove the duplicate values in the
> new list?
>
> so, something like:
> @A=(a, b, c, d, e)
> @B=(c, d, e, f, g)
> @C = @A - @B
> @C now equals (a,b,c,c,d,d,e,e,f,g)
>
> and I want to actually get (a,b,c,d,e,f,g) in one array and another array
> that is (c,d,e) if possible...or maybe if I could just get (c,d,e) array...
>
> I worked out a funky associative array uniq() function but it was a bit
> kludgey and I'd rather do a subtraction/difference or something like
> that...
Check out the Set::Scalar module in the CPAN. It implements almost every
set operation you could want, and it provides overloaded operators.
-Tom
------------------------------
Date: Fri, 14 Mar 1997 09:57:44 -0500
From: Harold Todd Chapman <chapman@techctr.buddcompany.com>
Subject: Perl 5.003 Install Question: Install without compiler?
Message-Id: <33296768.41C6@techctr.buddcompany.com>
I compiled and installed Perl 5.003 on an SGI Indy running IRIX 6.2.
I want to install on a 2nd Indy that has no complier. I tar'ed the perl
source directory with the compiled perl in it and moved it to the second
machine so I could simply do a "make install". But when I tried that I
got the following errors:
velo 5# make install
AutoSplitting perl library
Making DynaLoader (static)
cc -32 -L/usr/local/lib -o perl perlmain.o libperl.a
lib/auto/DynaLoa
der/DynaLoader.a `cat ext.libs` -lsun -lm -lc -lcrypt -lbsd -lPW
cc: Not found
*** Error code 1 (bu21)
What does this mean and how can I do an install without the compiler?
Thanks.
-Harold Chapman
------------------------------
Date: Fri, 14 Mar 1997 07:24:01 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Rajat Aggarwal <rajat@cs.uh.edu>
Subject: Re: Perl Browser
Message-Id: <Pine.GSO.3.96.970314072003.15346C-100000@kelly.teleport.com>
On Thu, 13 Mar 1997, Rajat Aggarwal wrote:
> I am trying to write a perl program that will take a URL and
> retrieve the document from the URL.
Why write you own? Wouldn't you rather have one that's already finished
and debugged? :-)
> Also, it should retrieve all embedded documents within that specified
> URL.
That's available, too.
> I looked at the client/Server example in the Learning Perl book, but did
> not help much.
Well, since I believe that book was written before the web got going,
that's probably to be expected. :-)
> I understand that http protocol just does anonymous ftps.
I think that you're mistaken here. http and ftp are two different
protocols, although many or most http clients can also make anonymous ftp
requests.
> I am not sure on how to implement this in Perl. Any suggestions on how
> to do this would be greatly appreciated.
How about CPAN? It's all there! Hope this helps.
http://www.perl.org/CPAN/
http://www.perl.com/CPAN/
-- 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: Fri, 14 Mar 1997 14:39:08 GMT
From: mlaker@contax.co.uk (Markus Laker)
Subject: Re: perl religion (was: Re: Which one is the best (pattern matching))
Message-Id: <5gbnt3$p7g$1@newsserver.dircon.co.uk>
roberto@eurocontrol.fr (Ollivier Robert) wrote:
> In article <slrn5hs1qu.634.erisson@kallisti.sw-tech.com>,
> E. <erisson@kallisti.sw-tech.com> wrote:
> > > bless $you;
> >
> > my ($child);
> confess "your sins";
seek SALVATION, $in, $Jesus;
Markus Laker
------------------------------
Date: Fri, 14 Mar 1997 13:53:45 +0000
From: "David J. Evans" <d.j.evans@rdg.ac.uk>
Subject: Re: Perl that FTP's a file?
Message-Id: <33295867.5F2D@rdg.ac.uk>
carlson@smart.net wrote:
>
> Does anyone know of a Perl script that will do the following:
> From an html page a perl script is executed to
> FTP a file to REMOTE_HOST ?
>
> This would not be from an anonymous ftp directory.
> Example: Someone purchases software over the web...they pay w/credit
> card , then download from a directory that is not anonymous.
> Any help would be appreciated....thank you.
>
> Chris Carlson , carlson@smart.net
> ----------------------------------------------------------------
Surely this is the wrong way round ? You want the server to initiate
the FTP and send a file to the client ? Does the client have a
directory for incoming files ? Why not use the standard HTTP protocols,
verify the payment and then ensure they can have access to your FTP
directory .... e-mail access details, generate a dynamic page with the
time-limited access info etc. You culd probably also do a redirect.
Of course you CAN do it the way you ask .... on an NT box you could use
Dada's win32::Internet module, which a CPAN near you will undoubtedly
have.
David
http://tigger.rdg.ac.uk/
------------------------------
Date: Fri, 14 Mar 1997 15:01:46 GMT
From: alastl@ctnet.net (John Prideaux)
Subject: Re: Perl5.003 for SCO??
Message-Id: <3329680c.3365968@news.ccinet.net>
Try this from SCO's Skunkware 96:
http://www2.sco.com/Skunk96/tools.html
On Fri, 14 Mar 1997 08:59:33 GMT, greg@geographe.com.au (Greg Wake)
wrote:
>
>Has anyone got Perl5.003 working with SCO OpenServer 5??
>
>Specifically I would like to get the Dynamic Loading working.
>
>Any pointers appreciated.
>
>
John Prideaux
alastl@ctnet.net
------------------------------
Date: Fri, 14 Mar 1997 07:01:41 -0600
From: thomasr@xtek.com (Thomas Rock)
Subject: Please help an AutoLoad newbie
Message-Id: <MPG.d930833358376e098968b@news.gte.net>
Hi!
I've got a large perl script with many, many subroutines, plus an
AUTOLOAD subroutine to handle any undefined subroutines.
I want to autoload all the subroutines, so I ran autosplit on the
script, keeping the AUTOLOAD routine in the main package. When I run the
script, non of the split subroutines are found, and the AUTOLOAD routine
is executed for every subroutine call. If I separate out the AUTOLOAD
routine from the main package and put it in with the other subroutines,
the subroutines are now loaded by perl, but the AUTOLOAD routine is never
found for the undefined routines.
From the FAQ and docs, it indicates that the AUTOLOAD routine is only
executed after all other search paths are exhausted. But that is not what
I am seeing. So, can this be done, or are my two goals mutually
exclusive?
Thanks
------------------------------
Date: 14 Mar 1997 14:50:56 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Preventing multiple copies of a script from running
Message-Id: <slrn5iipeb.2lr.dave@fast.thomases.com>
On 14 Mar 1997 00:40:39 GMT, Nicholas J. Leon wrote:
>
> Let's assume this scenerio: several copies of a single Perl script are
> invoked relatively simultaneously. What I would like is for them to
> execute one at a time; having each one wait until the previous one is
> finished before starting to execute.
>
> Obviously, I need some sort of locking mechanism for this, probably a
> file.
>
> Consider this code:
>
> sub mywait {
> sleep 5 while -f "/var/locks/MYLOCK";
> `touch /var/locks/MYLOCK`;
> }
> sub myexit {
> unlink "/var/locks/MYLOCK";
> exit 0;
> }
Rather than use 'touch', create the file explicitly (using the Posix 'open')
with flags O_CREAT | O_EXCL. This makes the test for the file existence
and the file creation itself an atomic operation.
This may not work over NFS, though.
Dave
_________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 14 Mar 1997 14:09:20 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: random perl core dumps with obscure message
Message-Id: <5gbm6g$ouc$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Tom Christiansen
<tchrist@mox.perl.com>],
who wrote in article <5gaulq$sab$1@csnews.cs.colorado.edu>:
> Sometimes, but the point is that it's *THE ONLY WAY OUT*
> of a read, etc. For example
>
> $SIG{ALRM} = sub {die};
> alarm 30000;
> eval { $line = <STDIN> };
> alarm 0;
>
> Is the only way you can do a timed-out read.
I'm absolutely ignorant in this, but is not the POSIX signal stuff
just the way to do it without a signal handler? What was that
discussion on p5-p about interrupting/noninterrupting (sp?) signals?
Ilya
------------------------------
Date: Fri, 14 Mar 1997 09:53:33 -0500
From: ffenimore@scholastic.com (Fred Fenimore)
Subject: Reg Ex help
Message-Id: <ffenimore-1403970953330001@208.205.75.6>
Help!
I can't figure out why the following does not work.
$str = "_MRK:ssdef .HEADLINE=_MRK:align center__MRK:face
plain__MRK:face bold__MRK:size 48__MRK:font Dutch801BT-Roman__";
$body = "\s*([^_]+)";
$faceMark = "_MRK:face$body\_";
$sizeMark = "_MRK:size$body\_";
$fontMark = "_MRK:font$body\_";
$ssdefMark =
"(_MRK:ssdef\s*([^=]*)=($alignMark|$faceMark|$sizeMark|$fontMark){4,}\_)";
if ($str =~ m/$ssdefMark/) {
print "$1";
}
It produces the following when run.
_MRK:ssdef .HEADLINE=_
I would expect it to match the entire string.
At this stage I am simply trying to find the entire ssdef marker in the
file. I intend to break it up and replace with something else but I can't
even get the silly thing to match. Its probably something simple but I
will be hanged if I can see what it is.
Fred
------------------------------
Date: 14 Mar 1997 15:08:02 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Reg Ex help
Message-Id: <slrn5iiqef.2lr.dave@fast.thomases.com>
On Fri, 14 Mar 1997 09:53:33 -0500, Fred Fenimore wrote:
> Help!
>
> I can't figure out why the following does not work.
>
> $str = "_MRK:ssdef .HEADLINE=_MRK:align center__MRK:face
> plain__MRK:face bold__MRK:size 48__MRK:font Dutch801BT-Roman__";
>
> $body = "\s*([^_]+)";
> $faceMark = "_MRK:face$body\_";
> $sizeMark = "_MRK:size$body\_";
> $fontMark = "_MRK:font$body\_";
> $ssdefMark =
> "(_MRK:ssdef\s*([^=]*)=($alignMark|$faceMark|$sizeMark|$fontMark){4,}\_)";
$alignMark seems to be missing. If I add it, then the match succeeds.
Dave
--
_________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 14 Mar 1997 10:10:26 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: remote to remote ftp from cgi
Message-Id: <5gbpp2$5ih@panix.com>
In <5gajl1$j09$1@csnews.cs.colorado.edu> Tom Christiansen <tchrist@mox.perl.com> writes:
> [courtesy cc of this posting sent to cited author via email]
>In comp.lang.perl.misc, clay@panix.com (Clay Irving) writes:
>Clay, what are these quotes for:
> :$ftp = Net::FTP->new("$target");
> :$ftp->login("$user","$password");
> :if (!($ftp->put("$filename"))) {
>Someday they may make you very unhappy.
>--tom
>--
> Tom Christiansen tchrist@jhereg.perl.com
>The human mind ordinarily operates at only ten percent of its capacity
>--the rest is overhead for the operating system.
My mind was operating at much less than ten percent -- The quotes aren't
necessary...
--
Clay Irving See the happy moron,
clay@panix.com He doesn't give a damn,
http://www.panix.com/~clay I wish I were a moron,
My God! Perhaps I am!
------------------------------
Date: Fri, 14 Mar 1997 15:11:50 GMT
From: neilb@cre.canon.co.uk (Neil Bowers)
Subject: Re: Scripts to parse common server logs
Message-Id: <E71Gvq.Kqv@cre.canon.co.uk>
Ross Carlson <webmaster@gmom.com> wrote:
: I am looking for premade scripts that can be used to parse web server
: logs in the common log format. I browsed CPAN, but only found the libwww
: modules which don't seem to be what I need.
Look for the Logfile:: modules by Ulrich Pffeiffer on CPAN:
http://www.perl.org/CPAN/modules/by-module/Logfile/
: I also am looking for date conversion routines that might be able to
: take the dates from the common log format, and convert them into the
: integer format that is returned from time().
The logfile modules look to do a pretty good job of this for you.
There are modules in CPAN for doing date munging as well; see:
http://www.perl.org/CPAN/modules/by-module/Date/
Neil
--
The use of COBOL cripples the mind; its teaching should, therefore,
be regarded as a criminal offense. -- E. W. Dijkstra
------------------------------
Date: Fri, 14 Mar 1997 08:24:32 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: We've baffled tech support, now on to Usenet...
Message-Id: <comdog-1403970824320001@nntp.netcruiser>
In article <5gbbg3$hku$1@sweet.telabridge.com>, cseawood@telabridge.com
(Christopher) wrote:
> Jason Maggard (jman95@ix.NOSPAMnetcom.com) wrote:
> : #And the mail is going where?
> : $recipient = 'office@claytorre.com';
> :
> The only thing that immediately pops into mind is that you'll need to
escape the @ in the address.
> Use $recipient = 'office\@claytorre.com';
what happens when you add a character to a string the is single quoted? :)
--
brian d foy <URL:http://computerdog.com>
unsolicited commercial email is not appreciated
------------------------------
Date: Fri, 14 Mar 1997 06:58:06 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: We've baffled tech support, now on to Usenet...
Message-Id: <u0ibg5.ch.ln@localhost>
Christopher (cseawood@telabridge.com) wrote:
: Jason Maggard (jman95@ix.NOSPAMnetcom.com) wrote:
: : Howdy!!!!
: :
: : This program is a really simple thing, but I cannot get it to run on my
: : web server. I use netcom, and all other scripts run fine. Any input???? I
: : spent 2 hours with the Netcom hosting support kids, and they just finally
: : gave up with a resounding "Hmph, I dunno..."
: :
: : #And the mail is going where?
: : $recipient = 'office@claytorre.com';
: The only thing that immediately pops into mind is that
: you'll need to escape the @ in the address.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You do NOT need to do that.
If you put it in double quotes you will need to do that.
: Use $recipient = 'office\@claytorre.com';
It would have taken only one line of code to check your answer
before posting it in front of the World...
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Fri, 14 Mar 1997 12:41:19 +0000
From: Nick Leaton <nickle@calfp.co.uk>
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <3329476F.5164@calfp.co.uk>
Nils Myklebust wrote:
> The largest databases in the world are running on Unix boxes.
> Reuter has 300.000 users connecting to their Unix systems (from NCR).
> Unix is growing up although ESA/MVS clearly have many things
> implemented that aren't easy, or perhaps not even possible, in Unix.
> Then again there are things you can do using Unix that would be hard
> and particularly expensive using ESA/MVS.
And those 300,000 users use what? Mainly PCs and even Reuters use PCs
for servers at the client end.
--
Nick
------------------------------
Date: Fri, 14 Mar 1997 10:21:53 -0800
From: "Michael J. South" <msouth@shodor.org>
To: cherold@pathfinder.com
Subject: Re: Why don't this helpful suggestions work?
Message-Id: <33299741.167E@shodor.org>
Here's one way to do it:
%scheme = %scheme_default;
%scheme = %scheme_showcategory if $in{'op'} eq 'showcategory';
%scheme = %scheme_showpage if $in{'op'} eq 'showpage';
%scheme = %scheme_basket if $in{'op'} eq 'showbasket';
This has the advantage of being very readable to a novice (I'm an expert
at being a novice...) and easy to maintain/extend with a text editor.
mike
msouth@shodor.org
<<begin include:
Charles Herold wrote:
[chop]
particular array, and I want a neater way to do it. This is the code
that needs changing:
if ($in{'op'} eq 'showcategory') {
%scheme = %scheme_showcategory;
} elsif ($in{'op'} eq 'showpage') {
%scheme = %scheme_showpage;
} elsif ($in{'op'} eq 'showbasket') {
%scheme = %scheme_showbasket;
} else {
%scheme = %scheme_default;
}
if(!%scheme) {
%scheme = %scheme_default;
}
[chop]
:end include>>
------------------------------
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 117
*************************************