[15875] in Perl-Users-Digest
Perl-Users Digest, Issue: 3288 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 8 11:05:32 2000
Date: Thu, 8 Jun 2000 08:05:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <960476715-v9-i3288@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 8 Jun 2000 Volume: 9 Number: 3288
Today's topics:
Re: 'can' oddity (M.J.T. Guy)
Re: << Problems with Net::SMTP >> (Eric Bohlman)
Re: << Problems with Net::SMTP >> <care227@attglobal.net>
[repost] sizeof($), sizeof(@), sizeof(%) (Andreas Kahari)
Re: [repost] sizeof($), sizeof(@), sizeof(%) (Simon Cozens)
Binary to Ascii <memberjh@yahoo.com>
Check as you go <jdNOjdSPAM@syncon.ie.invalid>
Re: Check as you go <care227@attglobal.net>
Re: Check as you go <ak@dasburo.de>
Database program <jim.ray@west.boeing.com>
DB_Lib <mihail.temelkov@gs.com>
Re: Dumb question.. How to prompt the user and get the <mattking@techie.com>
Encrypting / decrypting. <mattking@techie.com>
Re: Encrypting / decrypting. (David Wall)
Re: eventlog <carvdawg@patriot.net>
File I/O error on ActivePerl/IIS 4.0 <info.tech@nospam.co.uk>
getting rid of slashes.... <register_ms@hotmail.com>
Re: How to lock a tie()d file? <phill@modulus.com.au>
Re: HTTPS with LWP <Petri_member@newsguy.com>
Larry Rosler interview on perl.com! <care227@attglobal.net>
Re: Linux/Perl classes <care227@attglobal.net>
Re: Moving from Unix to NT - sending mail nobull@mail.com
Re: Net::Ping keeps returning 0? <helza@planet.nl>
Re: New Window <steve@gte.net>
Re: Perl and memory consumption <elaine@chaos.wustl.edu>
Re: perl cgi problem. thax in advance. <tony_curtis32@yahoo.com>
Re: perl cgi problem. thax in advance. <**news@andyrut.com**>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 8 Jun 2000 14:10:35 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: 'can' oddity
Message-Id: <8ho9gr$fnr$1@pegasus.csx.cam.ac.uk>
Bart Lateur <bart.lateur@skynet.be> wrote:
>
>That's more like it. But since when did Perl start to differentiate
>between object and class methods? Or is this typical for XS based
>modules?
Just a guess, as I don't use GD.pm myself:
Is there an AUTOLOAD subroutine at work? UNIVERSAL::can interacts
badly with AUTOLOAD. Call it a bug / feature according to taste.
Mike Guy
------------------------------
Date: 8 Jun 2000 10:07:42 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: << Problems with Net::SMTP >>
Message-Id: <8hnr9e$7nv$1@slb6.atl.mindspring.net>
Nick Porter (nickp@flyingpig.com) wrote:
: The main problem I am getting is that the constructor;
:
: $smtp = Net::SMTP->new(192.168.0.1,%option);
:
: just doesn't seem to be working.
The first argument needs to be quoted.
------------------------------
Date: Thu, 08 Jun 2000 08:21:38 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: << Problems with Net::SMTP >>
Message-Id: <393F8FD2.2644E06F@attglobal.net>
Nick Porter wrote:
>
> The main problem I am getting is that the constructor;
>
> $smtp = Net::SMTP->new(192.168.0.1,%option);
>
> just doesn't seem to be working.
>
> when it gets to the line
>
> $smtp->Net::hello()
>
> I get the error "Can't use an undefined value as a symbol reference at
> line 22" which sort of implies to me that the 'new' didn't work.
It kinda implies to me that %option is undefined. Why are you using
it? I've used that module before and never passed that hash to it,
I think you may be a bit confused. From the Net::SMTP docs:
SYNOPSIS
use Net::SMTP;
# Constructors
$smtp = Net::SMTP->new('mailhost');
$smtp = Net::SMTP->new('mailhost', Timeout => 60);
I think you are trying to imply the rest of the options, such as
timeout, are in the %options hash, which they aren't, because it is
not defined. You should try explicitly passing the options you want
in the method indicated above.
HTH
------------------------------
Date: 8 Jun 2000 15:55:50 +0100
From: andkaha@hello.to.REMOVE (Andreas Kahari)
Subject: [repost] sizeof($), sizeof(@), sizeof(%)
Message-Id: <393fa5e6@merganser.its.uu.se>
[didn't see it on deja.com for a week (almost), reposting]
Hi
When I declare a scalar like so
$i = 30;
how much space does it occupy? Well, it's an integer, but Perl stores
it as a floating point value (I think), so it has to be about the same
size as a C 'double' (i.e. 'sizeof(double)'). BUT, there's a reference
counter in there somewhere too... and the scalar occupies some space
in a typeglob called *i too I think. So how much space is REALLY that
scalar claiming? Or rather, in declaring that scalar, how much else
apart from the value needs storing?
How about an @array? There has to be a reference counter for each
item, doesn't it? How about a %hash? It has to store the keys too of
course... but is there something else that has to be stored somewhere
internally? Does the implementarion preallocate space for unused hash
and array entries?
What made me start to think about this was a binary tree that I
implemented as a class in Perl. I was wondering how much space each
blessed hash actually took when they contained two hash references and
one scalar (and how to get Perl to stop issuing warnings when
recursing more than 100 times).
Does anyone want to comment on this? I'm just curious, this has no
practical implications what so ever for me.
/A
--
# Andreas Kähäri, <URL:http://hello.to/andkaha/>
# -----------------------------------------------------------
# All junk e-mail is reported to the appropriate authorities.
# Quidquid latine dictum sit, altum viditur.
------------------------------
Date: 8 Jun 2000 14:13:31 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: [repost] sizeof($), sizeof(@), sizeof(%)
Message-Id: <slrn8jvagb.bh3.simon@justanother.perlhacker.org>
Andreas Kahari (comp.lang.perl.misc):
>When I declare a scalar like so
> $i = 30;
>how much space does it occupy?
> Well, it's an integer, but Perl stores it as a floating point value
Nope. It's an integer, and Perl stores it as an integer. Converting
things from int to float and back would be bad.
> (I think), so it has to be about the same size as a C 'double' (i.e.
> 'sizeof(double)'). BUT, there's a reference counter in there somewhere
> too... and the scalar occupies some space in a typeglob called *i too
> I think. So how much space is REALLY that scalar claiming? Or rather,
> in declaring that scalar, how much else apart from the value needs
> storing?
Quite a bit. You might want to have a look at perlguts for this. A
scalar is stored in a structure called an SV. It's quite a sprawling
structure, with lots of pointers spewing off in various directions.
Now, if we look in sv.h in the Perl source kit, we find this:
struct sv {
void* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
};
Now, that's the basic, empty thing. A U32 is a 32 bit integer. Most SVs
have things in them: if we've got an integer value, that sv_any points
over to a structure called xpviv:
struct xpviv {
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
IV xiv_iv; /* integer value or pv offset */
};
Strings are smaller, floats are bigger. Magic scalars are even bigger.
Examine sv.h.
>How about an @array? There has to be a reference counter for each
>item, doesn't it?
Now take a look into av.h:
struct xpvav {
char* xav_array; /* pointer to first array element */
SSize_t xav_fill; /* Index of last element present */
SSize_t xav_max; /* max index for which array has space */
IV xof_off; /* ptr is incremented by offset */
NV xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* magic for scalar array */
HV* xmg_stash; /* class package */
SV** xav_alloc; /* pointer to malloced string */
SV* xav_arylen;
U8 xav_flags;
};
Loads of stuff in there! The actually array bit is implemented as a
C array of pointers to SVs.
> How about a %hash?
hv.h. You can do that one. :)
>Does anyone want to comment on this? I'm just curious, this has no
>practical implications what so ever for me.
If individual variables' sizes are so important that you don't trust
Perl's way of laying things out, it's time to go to C.
--
"I think i'll take my girlfriend to vegas for a win'98 burn/upgrade...."
-- Megahal (trained on asr), 1998-11-06
------------------------------
Date: Thu, 8 Jun 2000 08:05:09 -0400
From: "Jane H." <memberjh@yahoo.com>
Subject: Binary to Ascii
Message-Id: <8ho24g$ptv$1@nntp9.atl.mindspring.net>
I just wanted to thank all those whom responded. I really appreciated it.
------------------------------
Date: Thu, 08 Jun 2000 03:56:14 -0700
From: deno <jdNOjdSPAM@syncon.ie.invalid>
Subject: Check as you go
Message-Id: <0a638af8.b0190839@usw-ex0105-036.remarq.com>
I'm new to perl ,but I would really appreciate help on this.
I have been scratching my head for days.
If $department, $firstname or $lastname is
blank or contains " the script must terminate with an error.
I would like to create the report files per department.
while (<FILE>)
{
($department,$firstname,$lastname,
$daily,$weekly,$monthly) = split (',');
}
Thanks.
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Thu, 08 Jun 2000 08:13:24 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Check as you go
Message-Id: <393F8DE4.EC5BDFEE@attglobal.net>
deno wrote:
>
> I'm new to perl ,but I would really appreciate help on this.
> I have been scratching my head for days.
>
> If $department, $firstname or $lastname is
> blank or contains " the script must terminate with an error.
^^^ undef value?
$ perldoc -f defined
$ perldoc perlfunc
or on the web:
http://www.perl.com/pub/doc/manual/html/pod/perlfunc/defined.html
If the defined() function doesn't suite your needs, you can always
do an explicit test on the variables (uglier) like:
if ($department eq '') {
break here, etc;
}else{
do stuff;
}
I think you get the idea.
------------------------------
Date: Thu, 08 Jun 2000 14:36:49 +0200
From: Alexander Knack <ak@dasburo.de>
To: deno <jdNOjdSPAM@syncon.ie.invalid>
Subject: Re: Check as you go
Message-Id: <393F9361.BCC4931E@dasburo.de>
> while (<FILE>)
>
> {
> ($department,$firstname,$lastname,
> $daily,$weekly,$monthly) = split (',');
die "blah" if (grep {!$_ || $_ =~ /\"/}
($department,$firstname,$lastname));
> }
--
+--------------------------------------------------------------------+
| Alexander Knack ........Entropie erfordert keine Wartung .........|
| dasburo.de ..................................................|
+--------------------------------------------------------------------+
------------------------------
Date: Thu, 8 Jun 2000 14:25:43 GMT
From: "Jim Ray" <jim.ray@west.boeing.com>
Subject: Database program
Message-Id: <FvuAn3.n2u@news.boeing.com>
What is the easiest way to handle a simple database need? Here is what I
have. A list of names and address, by regions and email.
I want to be able to build a list sorted by last name or company. I also
want to have control over what the output looks like. Also, I want to be to
place an mailto around the email address.
Now, my host will not support MySql, so that one is out. I currently have
the information in a text file. What would be my next best thing to do?
Any help and direction would be helpful.
Thanks!
Jim
jaray214@yahoo.com
------------------------------
Date: Thu, 08 Jun 2000 10:00:02 -0400
From: Mihail Temelkov <mihail.temelkov@gs.com>
Subject: DB_Lib
Message-Id: <393FA6E2.2E13A219@gs.com>
Does anyone know how to make a db call to a Sybase db using DB-Lib? I am
trying to store the results of a query that returns a single record to a
scalar..
------------------------------
Date: Thu, 8 Jun 2000 12:17:43 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: Dumb question.. How to prompt the user and get the input.
Message-Id: <8hns2c$feo$1@news1.transmedia.de>
Just a followup. I can use the <stdin> just fine now (although it took
forever to find it, Activestate doesn't include all the docs, atleast not
with the version I got).
So how can I make a prompt for a single key press? Something like 'press any
key to continue'.
------------------------------
Date: Thu, 8 Jun 2000 12:27:04 +0200
From: "Matt King" <mattking@techie.com>
Subject: Encrypting / decrypting.
Message-Id: <8hnsjq$fhm$1@news1.transmedia.de>
Hi. I need a way to encrypt and decrypt a small string (between 8 and 16
chars). I have looked on CPAN, but all I find are add-in modules. I need
something small (I know, I'm asking for allot now), that I can put in the
main pl file, so that the file is a 'stand alone' file and can be moved from
PC to PC without installing anything other then Perl.
I would like some type of encryption that can't easly be broken and doesn't
make the encrypted string more then double the orginal length. I have
thought of simple adding a randum number to each char/num in the string then
converting that to a hex value, but in order to be able to decode it, I need
to send the randum number with the encoded string making the encryption to
easy to break.
Can one of you please help me out with this?
THI Matt
------------------------------
Date: 8 Jun 2000 10:48:37 -0400
From: darkon@one.net (David Wall)
Subject: Re: Encrypting / decrypting.
Message-Id: <8F4D60B13darkononenet@206.112.192.118>
mattking@techie.com (Matt King) wrote in
<8hnsjq$fhm$1@news1.transmedia.de>:
>Hi. I need a way to encrypt and decrypt a small string (between 8 and 16
>chars). I have looked on CPAN, but all I find are add-in modules. I need
>something small (I know, I'm asking for allot now), that I can put in
>the main pl file, so that the file is a 'stand alone' file and can be
>moved from PC to PC without installing anything other then Perl.
>
>I would like some type of encryption that can't easly be broken and
>doesn't make the encrypted string more then double the orginal length. I
>have thought of simple adding a randum number to each char/num in the
>string then converting that to a hex value, but in order to be able to
>decode it, I need to send the randum number with the encoded string
>making the encryption to easy to break.
>
>Can one of you please help me out with this?
perldoc -f crypt
--
David Wall
darkon@one.net
------------------------------
Date: Thu, 08 Jun 2000 06:18:51 -0400
From: H C <carvdawg@patriot.net>
Subject: Re: eventlog
Message-Id: <393F730B.453D37EA@patriot.net>
Joe,
Have you tried stepping through the logs on one system at a time, one log at a
time?
Maybe you need to add a sleep() (though I can't imagine why).
Also, do you have admin privileges on those boxes?
I'll try your code on my machine and see what happens...
"J. Joseph Yusko" wrote:
> I apologize for not being more specific. Nice webpage and great idea by the
> way.
>
> Here is the code:
> use Win32::EventLog;
> my @Servers=("server1","server2");
> my($date)=join("-", ((split(/\s+/, scalar(localtime)))[0,1,2,4]));
> my($dest);
>
> foreach my $Server (@Servers) {
> for my $eventLog ("Application", "System", "Security") {
> $handle=Win32::EventLog->new($eventLog, $Server)
> or die "Can't open Application EventLog on $Server\n";
>
> $dest="C:\\BackupEventLogs\\$eventLog\\$date.evt";
> $handle->Clear($dest)
> or warn "Could not backup and clear the $eventLog EventLog
> on $Server ($^E)\n";
>
> }
> $handle->Close;
> }
>
> now it will create the application aspect of the log but after that it gives
> me an error message
> "Could not backup and clear the Security EventLog on server1 (Overlapped I/O
> operation is in progress)"
------------------------------
Date: Thu, 8 Jun 2000 14:53:20 +0100
From: "Information Technology" <info.tech@nospam.co.uk>
Subject: File I/O error on ActivePerl/IIS 4.0
Message-Id: <zEN%4.161$Qb4.76201@news.tcp.co.uk>
Hi,
We have a problem with a script running on ActivePerl/IIS 4.0. This is
related to file IO, in that when a file input is attempted, an error is
flagged and the process does not complete. The same script however works on
PWS and UNIX platforms.
Any suggestions would be greatly appreciated.
Many thanks
------------------------------
Date: Thu, 08 Jun 2000 16:25:50 +0200
From: Gert <register_ms@hotmail.com>
Subject: getting rid of slashes....
Message-Id: <vi9vjss0jis58hvaa54bmtb72n8m0ut72r@4ax.com>
Hi,
For my work I needed to put 350 pictures on the intranet, each on a different page.
The pictures were divided over 5 directories, named 1,2,3,4,5. *duh*
When it comes to tiring repetitive tasks, I'm quite lazy, so I thought I'd write a perl script to do that for me.
Everything works like a charm on my Win32 box, except for one thing.
It is inserting an <img> tag like: <img src="http://id001s/we/1///1.jpg"> (Notice the extra slashes.)
I did my very best to delete them. If I do nothing i get 3 slashes, if I try to remove one I get 2, if I try to remove 2
I get 3 slashes again, and if I try to remove all three there are 4 slashes in the tag.
Any of you experts can help me?
It would be much appreciated!
Gert.
P.S. The script is below...
#!c:\perl\bin\perl.exe
$picdir = "G:/WE/"; #Originally the pics were located somewhere else, but I moved them so the paths are identical now. I
#should remove one....
$webdir = "G:/WE/";
$url = "http://id001s/WE/$num/";
$picnum=0;
for ($num=1; $num <=5; $num++) {
@pics = glob("$picdir/$num/*\.jpg");
foreach $pic (@pics) {
$picnum++;
print "Processing $pic................";
# Hey, I want something to look at while it's doing it's thing....
$pic =~ s/G:\/WE\///;
# If I try to take out the slashes in the first regex, it won't remove anything....
$pic =~ s/\/\///;
# You would think I would have gotten all three slashes out now, but noooooo.....
open(NEWFILE, ">$webdir/$picnum.htm");
print NEWFILE &head;
print NEWFILE "<div align=\"center\"><IMG src=\"$url$pic\"></div></TD>";
print NEWFILE &finish;
close(NEWFILE);
print "Done.\n";
}
}
sub head {
$backnum = $picnum-1;
$fwnum = $picnum+1;
return<<"END_OF_HTML";
<HTML>
<HEAD>
<TITLE>$picnum</TITLE>
<SCRIPT language="JavaScript">
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else version = "n2";
if ( browserVer >= 4) version = "n3";
if (version == "n3")
{
back_on = new Image();
back_on.src = "/images/WE/back_on.gif";
back_off = new Image();
back_off.src = "/images/WE/back.gif";
fw_on = new Image();
fw_on.src="/images/WE/fw_on.gif";
fw_off = new Image();
fw_off.src = "/images/WE/fw.gif";
}
function on_img(imgName) {
if (version == "n3") {
imgOn = eval(imgName + "_on.src");
document.images[imgName].src = imgOn;
}
}
function off_img(imgName) {
if (version == "n3") {
imgOff = eval(imgName + "_off.src");
document.images[imgName].src = imgOff;
}
}
</SCRIPT>
</HEAD>
<BODY>
<CENTER>
<TABLE border=0 width=640 cellpadding=0 cellspacing=0 align="CENTER">
<TR>
<TD align=center valign=top><a href="$backnum.htm"><img src="/images/WE/back.gif" name="back" border=0
onMouseOver="on_img('back')" onMouseOut="off_img('back')"></a> <a href="$fwnum.htm"><img
src="/images/WE/fw.gif" name="fw" border=0 onMouseOver="on_img('fw')" onMouseOut="off_img('fw')"></a></TD>
</TR>
<TR>
<TD>
END_OF_HTML
}
sub finish {
return<<"END_OF_FINISH";
</TR>
<TR>
<TD> </TD>
</TR>
<TR>
<TD>
</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
END_OF_FINISH
}
------------------------------
Date: Thu, 08 Jun 2000 20:26:34 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: How to lock a tie()d file?
Message-Id: <393F74DA.68F8@modulus.com.au>
daveime wrote:
>
> I noted the comments on DB_File - I had come across them
> elsewhere also, the 4k cache read issue. I'd like advice on the
> following related topic.
>
> In Peter Hill's response, we use a separate lock
> file "customers.lock", and test for whether we can lock this
> before we tie the database.
>
> Usually, the last two things in any script would be UNTIE the
> database, and remove the lock on "customers.lock".
>
> Okay in principle, but if the script terminates prematurely, the
> UNTIE will happen anyway when the variables are deallocated, but
> the file "customers.lock" will never be unlocked - so no other
> user will be able to get a lock on in. Is there a way round
> this, without resorting to a wrapper on DB_File (I know they
> exist e.g. DB_File::Lock2, but my web space provider is being
> very obstructive and won't "make" that library for me). So I
> need a simple solution.
>
> Any ideas ?
Without detailing the implementation , in the real world you also need a
lock ageing algorithm. Locks older than some arbitrary value should be
considered invalid. As "customers.lock" has a last-modified datestamp,
we have a mechanism for comparing that datestamp with the current time,
and deciding, for our current application, whether the datestamp is a
realistic active lock or an aged lock (e.g. caused by a script failure).
All-in-all, locking is more complex than it first might seem, especially
where the OS does not provide intrinsic functions, e.g. for the Windows
environment, a flock() equivalent has to be written.
I'm considering whether a module for abstracting file locking
(especially for ties, portable across OS's) might make sense.
Any further contributions welcome.
hth
--
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/
------------------------------
Date: 8 Jun 2000 02:19:49 -0700
From: Petri Oksanen <Petri_member@newsguy.com>
Subject: Re: HTTPS with LWP
Message-Id: <8hnofl$1n0k@edrn.newsguy.com>
In article <8hmb3b$hgg$1@nnrp1.deja.com>, jalutz@papl.com says...
> Basically, I don't know how to compile it in MS VC++ 5.0. The
> documentation tells me:
> Then from the VC++ environment at a prompt do:
> nmake -f ms\ntdll.mak
> I don't know how to get to a prompt in VC++.
Well, it actually means that you should type the line at the command prompt,
while having the VC environment variables set.
The installation program for Vicious C++ should create a batch file for you
that, when run, will set up the whole environment for you.
The file is named vcvars32.bat, and on my system (with Studio V6.0) it is placed
in "\Program Files\VStudio\VC98\Bin".
Look around for it.
Then run it from a command prompt before running nmake from the same prompt.
This is of course on topic since you are trying to compile a Perl module. :)
Petri Oksanen
------------------------------
Date: Thu, 08 Jun 2000 08:59:33 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Larry Rosler interview on perl.com!
Message-Id: <393F98B5.965C167@attglobal.net>
From the interview:
:There's certainly no ANSI Perl. Does Perl need the same kind of
:official standardization that C got?
:
:LR: I believe that it does, in order to increase its acceptability.
:Many organizations either cannot or will not endorse the use of
:unstandardized languages in their business-critical activities.
Here here!
------------------------------
Date: Thu, 08 Jun 2000 08:31:18 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Linux/Perl classes
Message-Id: <393F9216.F9168A25@attglobal.net>
Stephen wrote:
>
> I'm intermediate with Perl. I can do just about anything I want to do, I
> just don't always do it well.
Welcome to the club friend! Personally, I'm considering one of the
classes taught by Randal Schwartz. I can't help but think that
they'd be good. Developed and taught by Randal L. Schwartz, Tom
Phoenix, and Brian D. Foy. If you read the newsgroups, these are
three well versed Perl guru's. I'm not sure how much they charge,
or if they will be in your area (might be worth going to them),
but their webpage is at:
http://www.stonehenge.com/perltraining/
Also check out:
http://training.perl.com/open-courses.html
and you'll see such names as Tom Christiansen.
------------------------------
Date: 08 Jun 2000 12:35:35 +0100
From: nobull@mail.com
Subject: Re: Moving from Unix to NT - sending mail
Message-Id: <u9ln0gl81k.fsf@wcl-l.bham.ac.uk>
newsmay2000@ordinate.co.uk (Ben Hambidge) writes:
> I have to move my CGI script from a Unix web server to a WinNT server.
> I send mail by piping to /usr/lib/sendmail using
> open(MAIL,"|/usr/lib/sendmail $recipient");
>
> What do I need to do to acheive the same effect in Windows?
Install sendmail on windows.
Alternatively use the higher level of abstraction provided
Mail::Mailer or some other mail module off CPAN. This way you can use
either the sendmail CPI API (as above) or SMTP (via Net::SMTP) with
minimal changes to your script.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 8 Jun 2000 15:19:28 +0200
From: "Helza" <helza@planet.nl>
Subject: Re: Net::Ping keeps returning 0?
Message-Id: <8ho6m2$8co2p$1@reader1.wxs.nl>
Hi,
well problem is i do not have telnet access to the server :(
with other words debuggin isn't anything i can do (don't know how i mean)
so i can't read the perlsec man page.
Can you send me that part of the docu to my email please?
(or point me to a webpage which has that info)
Greetings Helza
>
> If you use the default tcp 'ping' the host that you are testing must
> have the 'echo' service enabled. Windows machines and securely
> administered Unix machines are unlikely to have this enabled. For
> reliability you should use a proper icmp ping for which you will need
> root privilege (under unix anyway). If you are running this i the CGI
> environment as you appear to be then you might want to read the perlsec
> manpage and then run the program setuid.
>
> /J\
> --
> Son, a woman is a lot like a... a refrigerator! They're about six feet
> tall, 300 pounds. They make ice, and... um... Oh, wait a minute. Actually,
> a woman is more like a beer. They smell good, they look good, you'd step
> over your own mother just to get one! But you can't stop at one. You
> wanna drink another woman!
> --
> fortune oscar homer
------------------------------
Date: Thu, 08 Jun 2000 14:20:33 GMT
From: "SteveSingletary" <steve@gte.net>
Subject: Re: New Window
Message-Id: <RYN%4.164$Uo3.41786@dfiatx1-snr1.gtei.net>
I apologize for asking such a stupid and irrelevant question to this group.
I have been writing Perl code for a total of 4 days now. I thought that
maybe someone in this group may have done this before and maybe there was a
way to do this in Perl code - like a window.open command in Perl. I was
obviously very wrong. From now on if I have any doubt that my question may
pertain to a different language I will not ask.
>And stop posting in Jeopardy style. It makes lizards look smarter than you.
--- You're so funny - grow up and get a life! A piss poor personality can
make a lizard better than you!
------------------------------
Date: Thu, 08 Jun 2000 13:44:59 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: Perl and memory consumption
Message-Id: <B5651B9A.5B80%elaine@chaos.wustl.edu>
in article slrn8jts3d.g9s.tjla@thislove.dyndns.org, Gwyn Judd at
tjla@guvfybir.qlaqaf.bet quoth:
> Modules make it easier to write code that is
> efficient, bug free and featureful. They make it possible for the writer
> of the program to concentrate on the pieces of code that are related to
> the central purpose of the program without spending too much time
> debugging code that is outside their area of expertise.
While everyone is bickering about the speed and usefulness of modules I
think people have missed an important point about modules which is that they
are a valuable code base representative of the community. Larry rewrote Perl
to accomodate these things we call modules to draw more people in and allow
them to share their code. In the early days before CPAN Tim Bunce published
a list of modules and where to find them in the far flung reaches of the
net.
Modules have less to do with ease of code reuse than representing the spirit
of opensource which helped to create Perl and which lives to this day.
Modules range in quality but it is left to the user to decide if it is or
isn't useful for their task. There are also scripts on CPAN, some of which
use modules, for people to use or hack their own by example.
Modules are important to Perl regardless of their speed because they
represent someone using Perl and taking the time to share their code.
Maybe we should make bumper stickers "Have you hugged a CPAN author today?"
or "Honk if you love CPAN!" :)
e.
------------------------------
Date: 08 Jun 2000 08:45:12 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: perl cgi problem. thax in advance.
Message-Id: <87g0qop9qv.fsf@limey.hpcc.uh.edu>
[ dejeopardising post ]
>> On Thu, 8 Jun 2000 11:21:03 +0200,
>> "Raphael Pirker" <raphaelp@nr1webresource.com> said:
> Peng <peng@cs.ualberta.ca> wrote in message
> news:7xH%4.2208$vT6.296201@news1.telusplanet.net...
>>
>> the cgi program pops out a new window and display
>> message there. I will be very appreciated if someone
>> can tell me how to use perl to do that.
> inside the <form> tag, add target="_blank" and the CGI
> Script will make the results go inside a separate
> window!
What if I'm using a text-based browser like lynx? Or one
with a GUI that doesn't allow new windows to be created
(for whatever reason)? What do webbots see? The ultimate
story is: you cannot force browsers to do things from the
server-side. This will work for some
popular-gui-browsers-insert-names-here but not in all
cases.
(What was it? Two weeks since we last went through this
issue again?)
hth
t
--
"Trying is the first step towards failure"
Homer Simpson
------------------------------
Date: Thu, 8 Jun 2000 09:52:07 -0500
From: "Andy Rutledge" <**news@andyrut.com**>
Subject: Re: perl cgi problem. thax in advance.
Message-Id: <8hobsl$m2i$1@unlnews.unl.edu>
While you SHOULD probably use JavaScript to let the user know that his or
her form has been submitted, you can have the perl script simply return a
no-content header, HTTP status code 204. The perl script will be executed
fine, but will have no "content" to return to the user.
So just include the line:
print "Status: 204\n\n";
instead of any feedback you'd give to the submitter.
This will cause no new page to be loaded, but the script WILL be executed.
Again, it's important to let the user know somehow that their form has been
submitted, like using onClick() in JavaScript.
Peng <peng@cs.ualberta.ca> wrote in message
news:7xH%4.2208$vT6.296201@news1.telusplanet.net...
>
> Hi,all. Does anyone know how to let perl cgi achieve the following task?
> When a button is pushed, instead of giving the feedback to the same
window,
> the cgi program pops out a new window and display message there. I will be
> very appreciated if someone can tell me how to use perl to do that.
>
> Thax a lot.
>
> peng wang
>
>
>
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 3288
**************************************