[8021] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1646 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 15 12:18:00 1998

Date: Thu, 15 Jan 98 09:00:50 -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           Thu, 15 Jan 1998     Volume: 8 Number: 1646

Today's topics:
     Re: Can one Use Image Maps? (Nathan V. Patwardhan)
     Re: DMS1100 and perl? <rootbeer@teleport.com>
     getting info out of multidimentional assoc. array? (Andrew S Gianni)
     Re: Help Removing Spaces (Andrew M. Langmead)
     Re: Help! with dbmopen and hash evaluation Perl 5.002 <rootbeer@teleport.com>
     Re: How come this works <rootbeer@teleport.com>
     I want to create as many thread as socket connection to <perry@iway.fr>
     Re: Limiting simultaneous users <rootbeer@teleport.com>
     Location, Redirection <drax@usa.net>
     Re: Looking for online auction script <pstiles@ndsuk.com>
     Re: Parsing in Perl (Mike Stok)
     Perl and HTTP (Frank Driver)
     Perl appears VERY slow <cmcadam@icl.co.za>
     Re: Perl appears VERY slow (Brian Wheeler)
     Re: Problem: interpreter says getservbyname undefined <rootbeer@teleport.com>
     Re: Reading email via Perl <pstiles@ndsuk.com>
     Re: Reading email via Perl (Clay Irving)
     Re: Reading email via Perl <heikki.elenius@programmera.se>
     Re: Recursive mkdir() <qdtcall@esb.ericsson.se>
     Re: Reloading to cause form to function <rootbeer@teleport.com>
     Re: responding to prompting programs (Clay Irving)
     Re: responding to prompting programs (Tad McClellan)
     Re: responding to prompting programs <rootbeer@teleport.com>
     SDBM block limit sizes? ()
     Re: sending emails with perl ? <rootbeer@teleport.com>
     Re: source into binary code <dboorstein@ixl.com>
     Re: source into binary code <ajohnson@gpu.srv.ualberta.ca>
     Re: source into binary code <rootbeer@teleport.com>
     Tail -f <BDMA@prodigy.net>
     Re: Tail -f <xxTony.Curtis@vcpc.univie.ac.at>
     Re: Why would stat return 12/31/69 <rootbeer@teleport.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 15 Jan 1998 14:50:09 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Can one Use Image Maps?
Message-Id: <69l7n1$ad1@fridge.shore.net>

EntreprenuerOnline (melton@pitnet.net) wrote:
: This may sound like a newbie question but CAN & HOW does one use Image
: maps in Perl 5 generated pages? I have written several scripts that
: generate pages but have never tried to incorporate an Image Map. I

There's a CGI::ImageMap module kicking around -- it'll do what you
want.

--
Nathan V. Patwardhan
please don't send spam to president@whitehouse.gov


------------------------------

Date: Thu, 15 Jan 1998 08:13:41 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Franklin L. Petersen" <orangutan@grungyape.com>
Subject: Re: DMS1100 and perl?
Message-Id: <Pine.GSO.3.96.980115081253.5044G-100000@user2.teleport.com>

On Wed, 14 Jan 1998, Franklin L. Petersen wrote:

> Is it possible to access a DMS1100 database via perl?

I'm sure it's possible. If there's a module, it might even be easy. If
there's a module which does what you want, it should be listed in the
module list on CPAN. If you don't find one to your liking, you're welcome
and encouraged to submit one! :-)  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.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: 15 Jan 1998 10:46:05 -0500
From: agianni@xena.acsu.buffalo.edu (Andrew S Gianni)
Subject: getting info out of multidimentional assoc. array?
Message-Id: <69lavt$4cp$1@xena.acsu.buffalo.edu>

I'm trying to go through a miltidimentional associative array and get
information out of it. I'm trying to do something like useing nested foreach
statements, but as soon as a pull the first variable out of the array like:

foreach $name (%service_array){...}

it simply pulls each ordered pair out and I don't know how to access the data 
except by brute force. (i.e. do a split to get both keys and then the data)
Basicly one dimention of the array is names and the other is a list of
services and all cells are counts (services/person). I need to keep
all the information seperate, but I need to be able to go through and
tally total counts for services which is why I need to go through the
array like this. I just want to say for each name look at each
service. Perhaps this isn't the best way to go about this?

Any help appreciated.

Andrew

-- 
Andrew Gianni -- Applications Developer -- Administrative Computing Services
-------- University at Buffalo Computing and Information Technology --------
------------- 215 MFAC - Ellicott Complex - (716)645-3587x7009 -------------
----- agianni@acsu.buffalo.edu ----- http://www.cs.buffalo.edu/~agianni ----


------------------------------

Date: Thu, 15 Jan 1998 16:19:12 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Help Removing Spaces
Message-Id: <EMu2o0.LDu@world.std.com>

Dan Boorstein <dboorstein@ixl.com> writes:

>i believe these can be combined into the following one liner:

>    $string =~ s/^\s+|\s+$//g;

>i would also guess that it is faster than the one liner in the faq.

Why guess when it is so easy to test? From what I can see, it tends to
be faster in most cases than the one liner in the FAQ, but never gets
close to the two separate statements. Whats worse, both your one liner
and the FAQ's one liner both seem to spend a lot of time rejecting
whitespace in the middle of the string, and then performance starts to
equal.

#!/usr/bin/perl -w

use Benchmark;

my $long = 100;
my $short = 4;
my $base = 'test_string';

@strings{qw(long_preceding short_preceding long_trailing short_trailing
	    long_middle short_middle)} = (
					  ' ' x $long . $base,
					  ' ' x $short . $base,
					  $base . ' ' x $long,
					  $base . ' ' x $short,
					  $base . ' ' x $long . $base,
					  $base . ' ' x $short . $base);

%tests = (
	  two_step => q[$_ = $strings{$data};s/^\s+//;s/\s+$//;],
	  one_step_faq => q[$_ = $strings{$data};s/^\s*(.*?)\s*$/$1/],
	  dan => q[$_ = $strings{$data};s/^\s+|\s+$//g;]);
				
for $data (keys %strings) {
# time the tests
    print "testing string: $data\n";
    timethese(100000, \%tests);
# and test for accuracy
    undef %results;
    for $test (keys %tests) {
	eval $tests{$test};
	push @{$results{$_}},$test;
    }
    if(keys %results > 1) {
	print "results differ between tests:\n";
	for $test (%tests) {
	    print(join(" ", @{$tests{$test}})," produce:$test\n");
	}
    }
}
-- 
Andrew Langmead


------------------------------

Date: Thu, 15 Jan 1998 08:25:09 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Burris Jackes <fbjackes@hudsonwilliams.com>
Subject: Re: Help! with dbmopen and hash evaluation Perl 5.002
Message-Id: <Pine.GSO.3.96.980115082301.5044I-100000@user2.teleport.com>

On Wed, 14 Jan 1998, Burris Jackes wrote:

> The O'Reilly book states that, when evaluating a hash *in a scalar
> context*, it should return false if there are no entries.  However, the
> code: 
> 
> >  unless ($HASH) {

You're not using a hash there, that's a scalar called $HASH. This is
evaluating a hash in a scalar context:

    unless (%HASH) { ... }

> I also tried >> 
> 
> unless (%HASH) 

If that one doesn't work, you should file a bug report. Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: Thu, 15 Jan 1998 08:40:58 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Builders Connection <Webmaster@builders-connection.com>
Subject: Re: How come this works
Message-Id: <Pine.GSO.3.96.980115084019.5044L-100000@user2.teleport.com>

On Wed, 14 Jan 1998, Builders Connection wrote:

> If someone could please tell me how this piece of code works take out
> all commas and new lines but the second dos'nt work

My guess: It's a bug in your perl binary which would be fixed if you
install 5.004_04 or so. Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: Tue, 13 Jan 1998 12:49:33 +0100
From: Pascal PERRY <perry@iway.fr>
Subject: I want to create as many thread as socket connection to read/write data (Win NT)
Message-Id: <34BB54CD.3A52@iway.fr>

Perl under Win NT

Helo Guys,

I want to use multi-thread environment to create one thread, when 
accepting one connection, like in unix host using fork().

The problem is socket handle sharing.
I did not find a solution that allows created kid thread to read/write 
through parent socket handle that generated it.

Purpose is to minimize time spending on processing entire connection.
In other words, main script has to be occupied as less as possible,
giving data processing (socket reading/writing) to the brand new thread.

Thank for help that will certainly be appreciated...

--
Pascal PERRY
perry@iway.fr


------------------------------

Date: Thu, 15 Jan 1998 08:43:25 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Rick Johnson <webmaster@worldgraphix.com>
Subject: Re: Limiting simultaneous users
Message-Id: <Pine.GSO.3.96.980115084306.5044N-100000@user2.teleport.com>

On Wed, 14 Jan 1998, Rick Johnson wrote:

> I have a script which is basically a "classified ads script" but the
> number of users who are trying to access the script at the same time is
> so substantail that it seems to crash the script.  

I think you could use the methods in Randal's fourth Web Techniques
column, which explains how to use flock() to avoid problems when multiple
processes need to modify one file. Hope this helps! 

   http://www.stonehenge.com/merlyn/WebTechniques/

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: Thu, 15 Jan 1998 17:22:14 +0100
From: KS <drax@usa.net>
Subject: Location, Redirection
Message-Id: <34BE37B6.6D3D79BB@usa.net>

Why does the following code work with MS Internet Explorer but not with
Netscape Browsers?

$url = "http://www.myserver.com";
print "Location: $correcturl\n\n";

How do I have to modify it to make it work with every browser, or at
least with the above mentioned?

Thanks in Advance



------------------------------

Date: 15 Jan 1998 15:45:18 GMT
From: "Paul Stiles" <pstiles@ndsuk.com>
Subject: Re: Looking for online auction script
Message-Id: <01bd21cc$64831880$4f01a8c0@starion.east.ndsuk.com>

Dar Ny <darny@it-tradesources.com> wrote in article
<34BDC201.6F24282C@it-tradesources.com>...
> excuse me!
> 
> correct me if i'm wrong but cant cgi written in P E R L ? ? ?
> 
> darny
> 

CGI can be written in perl, but can also be written in virtually any other
programming/scripting language.

www.cgi-resources.com holds host to many cgi scripts written in a number
of languages.  

Perhaps a cgi news group would suit your needs more.  This group
seems more taylored perl specific questions.

--Paul Stiles





------------------------------

Date: 15 Jan 1998 11:12:46 -0500
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Parsing in Perl
Message-Id: <69lchu$1c8$1@stok.co.uk>

In article <69jgrl$3um$1@marina.cinenet.net>,
Craig Berry <cberry@cinenet.net> wrote:
>I'm working on a script which will parse out a source file with mildly 
>complex syntax and generate some binary data based on what it 
>finds...it's rather similar to a programming language compiler, though 
>that's not actually what it is. :)

 [...]

>Can anyone recommend modules which might solve my problem, please?

Have you checked out Parse::RecDescent ?  It may be the thing you need.  I
have installed it but not used it.

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


------------------------------

Date: Thu, 15 Jan 1998 16:07:01 GMT
From: fdriver@rnib.org.uk (Frank Driver)
Subject: Perl and HTTP
Message-Id: <69lcbh$fto$1@soap.uunet.pipex.com>

For some reason when I run my perl script I get the following error
"&main::AF_INET called at /bin/goto.pl line 93. What is really strange
is that I had no problems with this, until I had set it to take an
input to download a web page and output the web page to a file, other
than that there ARE NO CHANGES!!!. I have the link to sys/socket.ph
which AF_INET resides in, but it still brings up an error. IF you have
any clue, because I don' please email me. 

Frank

 



------------------------------

Date: Thu, 15 Jan 1998 18:15:22 +0200
From: Clive McAdam <cmcadam@icl.co.za>
Subject: Perl appears VERY slow
Message-Id: <34BE361A.31A9C61A@icl.co.za>

Perl v5.0.0.3
Solaris 2.5.1
Netscape Enterprise Server 3.0


My perl program reads input from a form, opens a file on disk, writes to
that file, closes the file, opens another file, writes some data to that
file and then closes that file, that's all.

Sometimes the procedure is blazing fast and other times my browser just
sits on "Connect: Host www.xyz.com contacted. Waiting for reply..." with
no joy. Only if I stop and reload a couple of times will it *maybe* come
right.

Does anybody know what could be causing this non-performance?

Regards
Clive McAdam

PS. I checked the server errors and there are none.


------------------------------

Date: 15 Jan 1998 16:37:45 GMT
From: bdwheele@indiana.edu (Brian Wheeler)
Subject: Re: Perl appears VERY slow
Message-Id: <69le0p$1t7$1@flotsam.uits.indiana.edu>

In article <34BE361A.31A9C61A@icl.co.za>,
	Clive McAdam <cmcadam@icl.co.za> writes:
> Perl v5.0.0.3
> Solaris 2.5.1
> Netscape Enterprise Server 3.0
> 
> 
> My perl program reads input from a form, opens a file on disk, writes to
> that file, closes the file, opens another file, writes some data to that
> file and then closes that file, that's all.
> 
> Sometimes the procedure is blazing fast and other times my browser just
> sits on "Connect: Host www.xyz.com contacted. Waiting for reply..." with
> no joy. Only if I stop and reload a couple of times will it *maybe* come
> right.
> 
> Does anybody know what could be causing this non-performance?
> 
> Regards
> Clive McAdam
> 
> PS. I checked the server errors and there are none.

Try this:
	add this to the beginning of the script:
open(LOG,">>/tmp/timelog");
print LOG "Start: ",time,"\n";


	at the end of the script:
print LOG "Finish: ",time,"\n";
close(LOG);


This'll tell you how long the perl script ran.  If its a really long time, then
it could be two things:
	1) its an OS problem:
		not enough memory?
		really busy process wise?
		mucho disk activity?
	2) its a perl script problem:
		review your code and see if there's something you're doing
that's slow :)

If it didn't run slow, then its the webserver that's slow :)

Brian


------------------------------

Date: Thu, 15 Jan 1998 08:11:15 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Alex Dowad <adowad@nospam.uniserve.com>
Subject: Re: Problem: interpreter says getservbyname undefined
Message-Id: <Pine.GSO.3.96.980115081019.5044F-100000@user2.teleport.com>

On 14 Jan 1998, Alex Dowad wrote:

> When I try to run the following line of code, the interpreter says that
> &main::getservbyname is undefined.
> 
> @smtp_info = &getservbyname('smtp', 'tcp');
> 
> I looked in the perl docs and they say that getservbyname is a built-in
> function. 

It is. But it's not a built-in subroutine. :-)

> To respond to this message, remove the "nospam." bit from the reply
> address.

To send me spam, please add "nospam" to my return address. :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: 15 Jan 1998 14:59:38 GMT
From: "Paul Stiles" <pstiles@ndsuk.com>
Subject: Re: Reading email via Perl
Message-Id: <01bd21c6$031b3d80$4f01a8c0@starion.east.ndsuk.com>

Try using Net::POP3

run perldoc Net::POP3 to get more info.

The Net hierachy should be included with the standard 
perl distruibution, if not download it from a cpan mirror.

The name of the package is called 'libnet' written by Graham Barr.

--Paul Stiles


Heikki Elenius <heikki.elenius@programmera.se> wrote in article
<34BE0487.485B@programmera.se>...
> Hi,
> is there anyway to read email on a pop3 server using Perl?
> I'm looking for a script similar to the one used by Hotmail.
> If you have any ideas about this, please reply both to the
> group and by email.
> 
> Thanks in advance,
> Heikki
> 


------------------------------

Date: 15 Jan 1998 10:06:48 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Reading email via Perl
Message-Id: <69l8m8$bhp@panix.com>

In <34BE0487.485B@programmera.se> Heikki Elenius <heikki.elenius@programmera.se> writes:

>is there anyway to read email on a pop3 server using Perl?

Like:

  Mail::POP3Client -- Module 
  http://www.perl.com/CPAN/modules/by-module/Mail
  Object-oriented interface to a POP3 server; can be used to write 
  mail notifiers (e.g. "biff") and mail readers. 

>I'm looking for a script similar to the one used by Hotmail.
>If you have any ideas about this, please reply both to the
>group and by email.

For all kinds of goodies, check:

  Perl Reference: mail and USENET news
  http://reference.perl.com/query.cgi?mail

-- 
Clay Irving <clay@panix.com>                  I think, therefore I am. I think? 
http://www.panix.com/~clay/


------------------------------

Date: Thu, 15 Jan 1998 16:51:22 +0100
From: Heikki Elenius <heikki.elenius@programmera.se>
Subject: Re: Reading email via Perl
Message-Id: <34BE307A.1138@programmera.se>

Thanks,
It was exactly what I was looking for!
/Heikki


------------------------------

Date: 15 Jan 1998 16:07:21 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Recursive mkdir()
Message-Id: <isbtxd3hee.fsf@godzilla.kiere.ericsson.se>

epa@datcon.co.uk (Ed Avis) writes:

> mkdir -p foo/bar/baz
> 
> works, creating directories foo and bar if they do not already exist.
> 
> Is there a feature like this in Perl?

RTFM File::Path
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


------------------------------

Date: Thu, 15 Jan 1998 08:17:10 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Emery Szasz <emery@adept.wizweb.com>
Subject: Re: Reloading to cause form to function
Message-Id: <Pine.GSO.3.96.980115081526.5044H-100000@user2.teleport.com>

On 14 Jan 1998, Emery Szasz wrote:

> in my Netscape browser when I enter info into the form for the pl to
> search - it gives no response - often times untill after I reload the
> page.

Sounds like a question about the browser, and not about Perl. If you have
questions about browsers (or about CGI scripting) which aren't answered in
the respective docs, please ask in a newsgroup about the appropriate
topic. The people there will be able to give you better and more complete
answers than we can here. Thanks! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: 15 Jan 1998 10:01:12 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: responding to prompting programs
Message-Id: <69l8bo$adt@panix.com>

In <34BD90D8.64E3C48@dkstat.com> Jean-Paul Cozzatti <jp@dkstat.com> writes:

>how does one write a script that responds to prompts, say

>login:
>passoword:

>presuming I have $login="jp" and $password="dummy"

>and would like to use my scalars to log in.

Er, this seems awful basic...

  #!/usr/local/bin/perl5.00403 -w

  print "login: ";
  chomp(my $login = <STDIN>);

  print "password: ";
  chomp(my $password = <STDIN>);

  print "\nMy login is: $login\n";
  print "My password is: $password\n";

Run the program:

  login: jp
  password: dummy

  My login is: jp
  My password is: dummy

>I would actually like to use such methods to make a cgi that makes
>additions to an .htaccess password file.
>Is this possible?

See brian d foy's response.

-- 
Clay Irving <clay@panix.com>                  I think, therefore I am. I think? 
http://www.panix.com/~clay/


------------------------------

Date: Thu, 15 Jan 1998 06:16:16 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: responding to prompting programs
Message-Id: <gmuk96.cma.ln@localhost>

Jean-Paul Cozzatti (jp@dkstat.com) wrote:

: how does one write a script that responds to prompts, say

: login:
: passoword:

: presuming I have $login="jp" and $password="dummy"

: and would like to use my scalars to log in.


Sounds like you should curl up with the Perl FAQ, part 8:

   "How can I write expect in Perl?"


: I would actually like to use such methods to make a cgi that makes
: additions to an .htaccess password file.
: Is this possible?


It is possible and Asked Frequently too:

   "How do I ask the user for a password?"

   "How do I put a password on my web pages?"

   "How do I edit my .htpasswd and .htgroup files with Perl?"


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Thu, 15 Jan 1998 08:48:38 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jean-Paul Cozzatti <jp@dkstat.com>
Subject: Re: responding to prompting programs
Message-Id: <Pine.GSO.3.96.980115084814.5044P-100000@user2.teleport.com>

On Wed, 14 Jan 1998, Jean-Paul Cozzatti wrote:

> I would actually like to use such methods to make a cgi that makes
> additions to an .htaccess password file.

There's a module on CPAN to do this. Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: 15 Jan 1998 15:57:23 GMT
From: v2matt@btv.ibm.com ()
Subject: SDBM block limit sizes?
Message-Id: <69lbl3$mci$1@mdnews.btv.ibm.com>

In the PERL book it says that sdbm block size limit is
1k but can be redefined. How do I do that?

Thanks
Matt


------------------------------

Date: Thu, 15 Jan 1998 08:41:57 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Pascal PERRY <perry@iway.fr>
Subject: Re: sending emails with perl ?
Message-Id: <Pine.GSO.3.96.980115084125.5044M-100000@user2.teleport.com>

On Mon, 12 Jan 1998, Pascal PERRY wrote:

>  1) Create a socket localy with socket()
>  2) Connect to a remote SMTP server with connect()
>     (for instance, STMP mail server of your ISP)
>  3) Send through this socket your SMTP-formated message 
>     print SOCK "MAIL FROM: <from@domain.dm>\r\n";
>     print SOCK "RCPT TO: <rcpt@domain.dm>\r\n";
>     print SOCK "DATA\r\n";
>     print SOCK "From: <from@domain.dm>\r\n";
>     print SOCK "To: <email@domain.dm>\r\n";
>     print SOCK "Subject: ...\r\n";
>     print SOCK "\r\n\r\n";
>     print SOCK "Hi Guys,\r\n";
>     print SOCK "\r\n.\r\n";
> 
>  4) You must verify for each server response that server 
>     return (in)correct identifier 2xx, 3xx, 4xx or 5xx
>     specified in RFC#821 (SMTP standard specifications)
>     and use RFC#822 (Internet Message Format Specifications)
>     to know how to compose correct mail header and body.

Gosh, that sounds like a lot of work. Somebody should make a module to do
this. :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: Thu, 15 Jan 1998 10:27:54 -0500
From: Dan Boorstein <dboorstein@ixl.com>
Subject: Re: source into binary code
Message-Id: <34BE2AFA.E94BF263@ixl.com>

Tom Christiansen wrote:
> Compiling produces no security.

Tom Christiansen wrote:
> Security through obscurity is a terribly dangerous miscarriage of
> truth.

Tom Phoenix wrote:
> Yes, there are a lot of people to whom obscurity seems like security.  

? the platypus {aka David Formosa} wrote:
> This is securaty by obsuraty.  Its not real securaty,  somewhere out
> there there is someone who will disassemble your code.

taken from the merriam webster dictionary:

security - "measures taken to guard against espionage or sabotage,
crime, attack, or escape"

obscure - "not readily understood or clearly expressed"

i'm not submitting that compiling is good security, only that it is
security. based on this definition, or one from your favorite
dictionary, do you agree or disagree with tom c's original statement?

second, the blanket statements that have followed concerning poorness
of security through obscurity i believe to be in error as well. isn't
key based cryptography security through obscurity? sure, it's on the
other end of a wide spectrum, but is an act of obscuring nonetheless.
all the information is there, it has simply been altered to an illegible
format. i believe perl's own crypt is just obscuring, though
irreversibly.

thank you for your time,

dan


------------------------------

Date: Thu, 15 Jan 1998 10:24:53 -0600
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: source into binary code
Message-Id: <34BE3855.18883355@gpu.srv.ualberta.ca>

Dan Boorstein wrote:
!
! Tom Christiansen wrote:
! > Compiling produces no security.
! 
! Tom Christiansen wrote:
! > Security through obscurity is a terribly dangerous miscarriage
! > of truth.
! 
! Tom Phoenix wrote:
! > Yes, there are a lot of people to whom obscurity seems like
! > security.
! 
! ? the platypus {aka David Formosa} wrote:
! > This is securaty by obsuraty.  Its not real securaty,  somewhere
! > out there there is someone who will disassemble your code.
! 
! taken from the merriam webster dictionary:
! 
! security - "measures taken to guard against espionage or sabotage,
! crime, attack, or escape"
! 
! obscure - "not readily understood or clearly expressed"
! 
! i'm not submitting that compiling is good security, only that it
! is security. based on this definition, or one from your favorite
! dictionary, do you agree or disagree with tom c's original
! statement?

I agree with Tom C's original statement.

if you have a security problem (or don't know if you do) with
a script, then just trying to hide the problem by compiling 
a) does not fix the problem
b) only hides it from people who know as little about such
   things as you
 
! second, the blanket statements that have followed concerning
! poorness of security through obscurity i believe to be in error
! as well. isn't key based cryptography security through obscurity?
! sure, it's on the other end of a wide spectrum, but is an act of
! obscuring nonetheless. 

but such key cryptography measures are generally intentionally
designed to be difficult to break...having the raw source code
to a PGP type application is not going to help you read someone's
encrypted data ... compilation is not designed to be a good (or
any kind of) encryption system, and thinking that it provides some
measure of encryption is simply false security.
(IMHO anyway)

regards
andrew


------------------------------

Date: Thu, 15 Jan 1998 08:34:19 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Johnson.Chow@Comp.HKBU.Edu.HK
Subject: Re: source into binary code
Message-Id: <Pine.GSO.3.96.980115083028.5044K-100000@user2.teleport.com>

On 14 Jan 1998, Mr. Chow Wing Siu wrote:

> If one has the method how to hide my perl source
> code in any sense, please tell me. 

I bury mine in the back yard under a big rock, and I never tell anyone
where it is.  ....D'oh!  :-)

> I need: run my perl but hide my perl source for all users. 

Run it in a kiosk which allows no logins. Or, see what section 3 of the
FAQ has to say about this. Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

Date: 15 Jan 1998 15:36:31 GMT
From: "BDMA" <BDMA@prodigy.net>
Subject: Tail -f
Message-Id: <01bd21cb$fc945860$163f9cd1@berry-isdn-ws>

I have a Perl/Tk program that logs all of its actions by writing them to a
file.  I then kick off an xterm with a tail -f.  This xterm displays
whatever is written to the log file.  I want to use a textbox to display,
in real time, the contents of the log file, instead of using the xterm. 
Can anyone give me a clue as to how to do this.  I have read Tk/Tcl books,
I have looked through the Advanced Perl Programming book, and I looked
through the Perl Development Kit manuals.

Thanks,
- Brett Berry
sc2784@email.mot.com
bdma@usa.net


------------------------------

Date: 15 Jan 1998 16:51:00 +0100
From: Remove xx to reply <xxTony.Curtis@vcpc.univie.ac.at>
To: bdma@prodigy.net
Subject: Re: Tail -f
Message-Id: <7xg1mpwxaz.fsf@vcpc.univie.ac.at>


Re: Tail -f, BDMA <BDMA@prodigy.net> said:

BDMA> I have a Perl/Tk program that logs all of its actions
BDMA> by writing them to a file.  I then kick off an xterm
BDMA> with a tail -f.  This xterm displays whatever is
BDMA> written to the log file.  I want to use a textbox to
BDMA> display, in real time, the contents of the log file,

How about this?

    http://reference.perl.com/query.cgi?sysadmin

See "File::Tail".

it may be of use...

hth,
tony


------------------------------

Date: Thu, 15 Jan 1998 08:07:16 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "David J. Boyd" <djboyd@sam.on-net.net>
Subject: Re: Why would stat return 12/31/69
Message-Id: <Pine.GSO.3.96.980115080616.5044E-100000@user2.teleport.com>

On Wed, 14 Jan 1998, David J. Boyd wrote:

> Anyone know why the stat function would return a date of 12/31/69 with a
> time of 19:00 on a file or directory. 

>     $mtime= (stat($fullFilename))[9];

Hmmm... Could you be getting undef instead of zero? :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



------------------------------

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 1646
**************************************

home help back first fref pref prev next nref lref last post