[9944] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3537 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 25 14:07:24 1998

Date: Tue, 25 Aug 98 11:01:38 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 25 Aug 1998     Volume: 8 Number: 3537

Today's topics:
    Re: "bind" Problems with Internet Server Program (brian d foy)
    Re: A real newbie question huntersean@hotmail.com
    Re: Active Perl and Net::FTP broken mike_lottridge@mentorg.com
        command line switches <jeff777@earthlink.net>
    Re: DBI file (John D Groenveld)
    Re: Detecting Socket Close <jgoldberg@dial_put-a-decimal-here_pipex.com>
        Difficulty in Downloading Module Sets... garten@my-dejanews.com
    Re: Dynamically creating graph images <sidi@angband.org>
        Help - Problem with Metatag Parser using HTML::HeadPars swhite@accessonline.com
        Help: Downlaoding WWW::Search (also Libwww-perl) garten@my-dejanews.com
        how do I use <STDIN> so that it doesn't echoes back the (Fernando)
    Re: how do I use <STDIN> so that it doesn't echoes back (Mike Stok)
        Inserting into a linked list in a sorted fashion mlehmann@prismnet.com
    Re: Inserting into a linked list in a sorted fashion <tchrist@mox.perl.com>
        Linux database performance problems mga@dejanews.com
    Re: Looking for Programmer/Job Opp. <jdporter@min.net>
    Re: Packages must be installed using ppm.pl (David B. White)
    Re: Perl CGI Question (Sherm Pendley)
    Re: Perl compiler (Nathan V. Patwardhan)
    Re: Perl compiler (Clinton Pierce)
    Re: Perl compiler (I R A Aggie)
    Re: Perl compiler <yong@shell.com>
    Re: Perl compiler <tchrist@mox.perl.com>
    Re: Perl compiler (Nathan V. Patwardhan)
    Re: Perl documentation (Nathan V. Patwardhan)
    Re: Perl documentation (Clinton Pierce)
    Re: Perl documentation (Brand Hilton)
        Reading binary data... <hekke@mail1.stofanet.dk>
    Re: Regex question - removing HTML tags.... (brian d foy)
    Re: Regex question - removing HTML tags.... (Larry Rosler)
        Search and replace ABeldowi@newyorklife.com
        Trouble with MIME:Entity <ulf.wendel@airbrush-zeitung.de>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Tue, 25 Aug 1998 12:02:21 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: "bind" Problems with Internet Server Program
Message-Id: <comdog-ya02408000R2508981202210001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6rujua$4pi$1@nnrp1.dejanews.com>, robertrose@my-dejanews.com posted:

>(The subroutine "tprint" is used to print out program status in html so that
>it shows up on the web page.)

does tprint include whatever is in $! ?  that information is usually
revealing :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


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

Date: Tue, 25 Aug 1998 15:46:31 GMT
From: huntersean@hotmail.com
Subject: Re: A real newbie question
Message-Id: <6rum8n$8cp$1@nnrp1.dejanews.com>

In article <6rp2ml$tkt$1@news.loxinfo.co.th>,
  "Rob" <rob3@loxinfo.co.th> wrote:
> I have a form that I want to post to two different CGI scripts
> simultaneously is this possible...
> Thanks Rob
>
>
What about having the form posted to one cgi that then posted it to the other,
or posting it to a tiny cgi that posted it to both of the others?

Sean Hunter

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 25 Aug 1998 16:28:13 GMT
From: mike_lottridge@mentorg.com
Subject: Re: Active Perl and Net::FTP broken
Message-Id: <6ruoms$b8a$1@nnrp1.dejanews.com>

In article <m31zq6bv0t.fsf@tehran.p4inet.no>,
  Gorm Haug Eriksen <xxxgormxxx@p4.no> wrote:
>
> I am using the latest activeperl, but it doesn't seem to work with
> the Net:FTP package with put commands.
>
> The ip of the host seems right, but the port get set to 0.
>

yes, i have the same problem. The other binary dist. of perl (Sarathy's) from
CPAN works fine. I tried copying the lib from that version over the activeperl
lib, still get the same error.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 25 Aug 1998 10:08:11 -0700
From: "Jeff Bailey" <jeff777@earthlink.net>
Subject: command line switches
Message-Id: <6ruqk4$egr$1@oak.prod.itd.earthlink.net>

I've seen a few ways to handle this with perl and could use any of them but
was wondering what everyone prefers for handling this in perl.
Unfortunately at the moment the system administrators aren't allowing the
perl module that handles this.  If anyone knows where the most up to date
version is maybe I can just drop it into my home directory ;-)

Thanks,
Jeff




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

Date: 25 Aug 1998 12:50:35 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: DBI file
Message-Id: <6ruq0r$15k$1@tholian.cse.psu.edu>

http://www.arcana.co.uk/technologia/perl/DBI/


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

Date: Tue, 25 Aug 1998 18:09:41 +0100
From: "Jeremy Goldberg" <jgoldberg@dial_put-a-decimal-here_pipex.com>
Subject: Re: Detecting Socket Close
Message-Id: <6rur4i$j31$1@plug.news.pipex.net>

Christopher M. DiPierro wrote in message
<6rs4do$rj5@dailyplanet.wam.umd.edu>...
>I am writing a small perl client that is designed to test some HTTP/1.1
>features. A problem I have is with persistent connections. I can easily
>make a socket connection, send a request, receive a response and close a
>connection. However, if I want to send another request on that same socket
>(HTTP/1.1 or 1.0 /w Keep-Alive allows this) I need to see if the server
>closed the socket. What's the best way to do this?


Here's a sample of code that works (albeit as a hack, don't expect too
much) -

sub CheckConnect
{
    # Make sure we're still connected
    # It says never to use select() with buffered IO, but since the IO
    # is all autoflush()ed over a socket, it's effectively unbuffered.
    # Unfortunately, select() never returns an error, and eof() blocks if
there's
    # no input. Fortunately, it returns read-ready when the socket is
closed,
    # so if it's read-ready we can check for eof(), and if so, it's dead.

    my( $rin, $rout, $ret );

    $rin = '';
    vec( $rin, fileno( STDIN ), 1) = 1;
    $ret = select( $rout=$rin, undef, undef, 0 );
    if( $ret && ord( $rout ) && eof( STDIN ) )
    {
        Log( "Connection closed by peer." );
        Disconnect();
    }
    return( $connected );
}





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

Date: Tue, 25 Aug 1998 17:22:47 GMT
From: garten@my-dejanews.com
Subject: Difficulty in Downloading Module Sets...
Message-Id: <6rurt6$fb9$1@nnrp1.dejanews.com>

Tuesday, Aug 25

Friends: please help, new to Perl, wanting to download module (my 1st
download)  set WWW::Search (which also needs LIBWWW-Perl).. This is what I
did  it's not working, there has to be an easier way.. I got a copy of 
WWW::Search called WWW_Search_1.020.tar.gz (latest release 8/12/98)  and
placed in a Windows directory then will upload to my UNIX "WEB" 
subdirectory..Then I will need to unzip it prior to running those  commands
(perl Make.file.PL, make, make test, make install) from UNIX  command line
you guys take for granted..

        The other module set (LIBWWW-Perl) it's more difficult, when I try to
        download it I get a Netscape message that I need a 'plug in' because
        of an unknown filetype /x-gunzip (download
        file:libwww_perl_5.36.tar.gz)..

  Can someone provide me with the steps to properly download these module 
sets so I can make use of this application??


Thanks,
   Sam Garten























-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 25 Aug 1998 16:01:19 GMT
From: Chris Sidi <sidi@angband.org>
Subject: Re: Dynamically creating graph images
Message-Id: <6run4f$bu$1@news-int.gatech.edu>

In comp.lang.perl.misc Andrew MacInnes <a.g.macinnes@nospam.rl.ac.uk> wrote:
>> I am using perl to fetch data from a database for a web project that I am
>> working on. Now, I need to dynamically build a bar graph with this data.

Looks like there's a javascript equivalent to GIFgraph now:
http://developer.netscape.com/docs/technote/javascript/graph/

I think the JS graphs look better than the GIFgraph ones, partly due to
the font.

Though you don't always know if your users will have a javascript capable
browser, have JS enabled, and that your script will run without errors on
all browsers.

-Sidi

-- 
Does Arkansas suck?
"I am not going to allow my son to stay in Arkansas... We're going to get 
him the hell out of here. This isn't the place for a rabid animal, say
nothing about a 14-year-old boy." -Scott Johnson, father of killer schoolboy

"I think a lot of this is prejudice against our state. They wouldn't do
this if we were from some other state," - Hillary Clinton on Investigation


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

Date: Tue, 25 Aug 1998 16:45:34 GMT
From: swhite@accessonline.com
Subject: Help - Problem with Metatag Parser using HTML::HeadParser
Message-Id: <35e2e93c.2151863@news.sprint.ca>

Any ideas on how to make this script parse the given html file for the
contents of its predefined metatags.

The next step would be to trap the URL of the html file which
initiated this script and have an automatic metatag viewer for
predefined metatags.

Thank everyone.
Stephen White

--------- SCRIPT ---------

open(FH, "test.html") or die($!);
$doc = join("", <FH>);
close FH;

# $doc = "content-type: text/html\n\n" . $doc;

require HTML::HeadParser;
sub extract_meta
{   
	my($meta, $content) = @_;
	require HTML::HeadParser;
	my $p = HTML::HeadParser->new;
	$p->parse(@_);
	return $p->header("X-Meta-$meta");
}

print "Content-type: text/html\n\n";

print "<br><br><br><b>Title:</b>";
print extract_meta("title", $doc);
print "<br>";

print "<b>Originator:</b>   ";
print extract_meta("originator", $doc);
print "<br>";

print "<b>Author:</b>   ";
print extract_meta("author", $content);
print "<br>";



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

Date: Tue, 25 Aug 1998 16:39:56 GMT
From: garten@my-dejanews.com
Subject: Help: Downlaoding WWW::Search (also Libwww-perl)
Message-Id: <6rupcs$bul$1@nnrp1.dejanews.com>



I need your help.. Trying to download the module set WWW::Search (and
Libwww-perl which is needed by WWW::Search)..Need to know the Steps Involved..

This is what I've done so far: downloaded WWW_Search_1.020.tar.gz to a
Windows/95 platform then will upload to my UNIX 'WEB' subdirectory then I
think I need to unzip it. Once this is done then I enter from the UNIX
command line: perl Makefile.PL, make, make test and make install (you guys
seem to take these commands for granted but what do they do??).

For the Libwww-perl module set - I've had difficulty downloading; Netscape
complains it needs a "plug in" to read unknown file type /x-gunzip.. How do I
get around this problem??

Can you download directly to UNIX??

There must be an easier way..Your directions would be most helpful..

Thanks,
  Sam Garten

P.S. - As you can tell this is my 1st down downloading a module set..

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 25 Aug 1998 16:15:53 GMT
From: fmiramon@facstaff.wisc.edu (Fernando)
Subject: how do I use <STDIN> so that it doesn't echoes back the input
Message-Id: <6runvp$jfc$2@news.doit.wisc.edu>

If I write the following code:

print "what is your password?\n";
$password<STDIN>;


and then I run it, I get prompted for my password but when I type my password 
it shows up. Is there a way to make it, so that it doesn't show the input 
(password in this case) as you type it.

I appreciate the help.



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

Date: 25 Aug 1998 16:46:30 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: how do I use <STDIN> so that it doesn't echoes back the input
Message-Id: <6rupp6$8no@news-central.tiac.net>

In article <6runvp$jfc$2@news.doit.wisc.edu>,
Fernando <fmiramon@facstaff.wisc.edu> wrote:
>If I write the following code:
>
>print "what is your password?\n";
>$password<STDIN>;
>
>
>and then I run it, I get prompted for my password but when I type my password 
>it shows up. Is there a way to make it, so that it doesn't show the input 
>(password in this case) as you type it.

If you have a recent distribution of perl then you should have access to
the perl frequently asked questions as the perlfaq* man pages (or if your
system doesn't have man then you can try the command

  perldoc perlfaq

to view the overview.)  This is covered in section 8, perlfaq8, which
contains:

  How do I ask the user for a password?

  (This question has nothing to do with the web.  See a different FAQ for
  that.)

  There's an example of this in the crypt entry in the perlfunc manpage).
  First, you put the terminal into "no echo" mode, then just read the
  password normally.  You may do this with an old-style ioctl() function,
  POSIX terminal control (see the POSIX manpage, and Chapter 7 of the Camel),
  or a call to the stty program, with varying degrees of portability.

  You can also do this for most systems using the Term::ReadKey module from
  CPAN, which is easier to use and in theory more portable.

      use Term::ReadKey;

      ReadMode('noecho');
      $password = ReadLine(0);

The FAQ is a good place to start looking for answers to questions you're
sure someone else must have had in the past.  Sometimes it can take a
couple of passes through the questions to spot a question or answer with
relevant keywords - you'll pick up a lot by accident as you look through
the docs...

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: Tue, 25 Aug 1998 16:57:41 GMT
From: mlehmann@prismnet.com
Subject: Inserting into a linked list in a sorted fashion
Message-Id: <6ruqe4$djb$1@nnrp1.dejanews.com>

What is a good why to implement a linked list such that it is always in a
sorted order?  I have been using an array for the linked list, finding the
insertion point by traversing the list, and then using splice to place the
item in the list.  This is geometrically in-efficient as the list grows. 
What other types of existing solutions are there for doing this in perl?

A B-Tree sounds like the right thing to do, but I doubt I would gain better
performance implmenting a B-Tree myself in perl than if I used perl's built in
arrays and my in-efficent traversal.


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 25 Aug 1998 17:25:02 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Inserting into a linked list in a sorted fashion
Message-Id: <6rus1e$6h5$2@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, mlehmann@prismnet.com writes:
:What is a good why to implement a linked list such that it is always in a
:sorted order?  

How many elements do you have?  How often do you insert them?
How often must you process them in a sorted fashion?

First time through, you should just do the dumb and easy thing, sorting on 
demand.  If that's good enough, great.

Next time through, if there is one, use the DB_File modules B-tree
ordered hash bindings.  If that's good enough, great.

If all else fails, implement an ordered dynamic set such as you
might find in any compsci book, such as Cormen et al.  I would 
avoid this.

--tom
-- 
BTL didn't really have a distribution policy in the early days,
you got a disk with a note: Here's your rk05, Love Dennis.  If UNIX
crapped on your rk05, you'd write to Dennis for another.
 --Andy Tannenbaum, "Politics of UNIX," Washington, DC USENIX Conference, 1984


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

Date: Tue, 25 Aug 1998 15:46:17 GMT
From: mga@dejanews.com
Subject: Linux database performance problems
Message-Id: <6rum89$8cl$1@nnrp1.dejanews.com>

Hello,

Can anyone shed any light on the following questions?

1) We are using Perl 5.004 and Sleepycat 2.4.14 (using transactions)
to implement 5 tied hashes.  Input record processing runs at about
10/sec initially but slows (linearly) to 1 per 30sec over the course
of 20K records.  Since without tying the hashes, record processing
continues at the initial 10/sec throughout more than 250K records,
I'm guessing it has something to do with the tied hashes.  I have
 .5G RAM and 13G RAID0 but can't get the db to use these resources
fully.  (I can't find anything to force increased disk cache,
preallocate db files, etc.)  It seems to prefer to minimize the
Sleepycat/DB footprint.  Any suggestions?

2) Since I'm using transactions, I'm getting gigs
of log files. Does anyone know how to control commit intervals
with a Sleepycat DB?

3)  Does anyone know of any tools for analyzing the performance
of applications on Linux?  top shows the application spends 50-90%
in disk state.  I'd like to know more about which files are the
bottleneck and why.

Thanks for any info,
Meredith

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 25 Aug 1998 13:05:33 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Looking for Programmer/Job Opp.
Message-Id: <35E2EEDD.1DF3@min.net>

no.unsoliciteds@dead.end.com wrote:
> 
> maybe you should just buy a good book on HTML and go visit Matts script
> archive ...

Harsh!  Telling someone to use Matt's Scripts is essentially saying
"go screw yourself".

-- 
John Porter


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

Date: 25 Aug 1998 16:24:16 GMT
From: dbwhite@btv.ibm.com (David B. White)
Subject: Re: Packages must be installed using ppm.pl
Message-Id: <6ruofg$8ku$4@mdnews.btv.ibm.com>

In article <35E2C09F.DADDEF98@kodak.com>,
        Chris Bower <clbower@kodak.com> writes:
> I cannot use ppm.pl through our corporate firewall, so how am I supposed to install
> new modules?

To quote 'chuck', in this discussion group from an article with
Subject: Activestate's ppm.pl works behind firewall

> Anyway, I set http_proxy=http://<ip address of proxy:80>/ and it worked.
> (I previously omitted the trailing /)


Or, to quote 'chuck', in this discussion group from an article with
Subject: Re: Installing Additional Packages in ActivePerl

> Try the following:
> 1) go to www.activestate.com/packages
> 2) Look at the Module names listed and see if they have the one you want
> 3) example Tk
>    type www.activestate.com/packages/Tk.ppd
>    Hit save when prompted. Save it in a dir called packages.
> 4) type www.activestate.com/packages/x86/Tk.tar.gz
>    (I think x in x86 is lowercase, or try uppercase also)
> 5) save the file to a directory x86 under packages.
> 6) rename the file in case Windows turns the filename to Tk_tar.gz (from Tk.tar.gz)
> 7) start ppm and type: set repository local c:\packages
> 8) install Tk

Take your pick...  Try Deja News for more details on the setting the
proxy, if that's your choice.
(Sounds like this is a candidate for the FAQ, if not there already.)
--
David B. White
IBM Microelectronics, Circuit Verification & Design Tools
Internal: dbwhite@btv             Internet: dbwhite@vnet.ibm.com
Phone: 802-769-5671     (TieLine: 446)     Fax: 802-769-5722


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

Date: Tue, 25 Aug 1998 16:52:37 GMT
From: grinch@whoville.com (Sherm Pendley)
Subject: Re: Perl CGI Question
Message-Id: <35eceae8.22332146@news.shore.net>

On 16 Aug 1998 08:18:00 GMT, abigail@fnx.com (Abigail) wrote:

>pages are optimized for the Viola browser?

I remember a browser called Cello, is Viola related?

-grinch



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

Date: Tue, 25 Aug 1998 16:01:16 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl compiler
Message-Id: <gdBE1.91$Ed2.1251341@shore>

Scratchie (upsetter@ziplink.net) wrote:

: What might have been reasonable would have been to point her in the
: direction of some resources regarding ways to safely accomplish her

And you didn't offer a solution yourself because ... ?

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: 25 Aug 1998 16:01:30 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: Perl compiler
Message-Id: <6run4q$2i72@eccws1.dearborn.ford.com>

In article <X1pE1.2$x8.17281@nsw.nnrp.telstra.net>,
	mgjv@comdyn.com.au (Martien Verbruggen) writes:
>In article <slrn6u44q0.t6i.sholden@pgrad.cs.usyd.edu.au>,
>	sholden@pgrad.cs.usyd.edu.au (Sam Holden) writes:
>
>> Usenet is also a community of people who tend to have a open and
>> sharing mentallity, that probably arises from the fact that that was
>> how the computing world was way back when...
>
>Usenet _used to_ be a community of people that tend to have an open
>and sharing mentality. The question that started this thread shows you
>that that is no longer the case :( Only a small subset of Usenet users
>nowadays still has that mentality.

Take off the rose-colored glasses.  USENET has always been full of weenies
that didn't want to share.  There's just more of them now. 

-- 
+------------------------------------------------------------------------+
|  Clinton A. Pierce    |   "If you rush a Miracle Man,   | http://www.  |
|  cpierce1@ford.com    |     you get rotten miracles"    | dcicorp.com/ |
| fubar@ameritech.net   |--Miracle Max, The Princess Bride| ~clintp      |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*



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

Date: Tue, 25 Aug 1998 11:45:47 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Perl compiler
Message-Id: <fl_aggie-2508981145480001@aggie.coaps.fsu.edu>

In article <6rtt3h$59r$2@marina.cinenet.net>, cberry@cinenet.net (Craig
Berry) wrote:

+ Abigail (abigail@fnx.com) wrote:

+ : Then don't come here for free advice on hiding your petty source code.
+ : That makes you into a selfish person.
 
+ Note that I never asked for such advice, nor would I do so; I understand
+ the consensus ethic of this community well.

You didn't. The original poster did.

+ I'm merely attempting to
+ inject a note of realisim into all the high-flown 'morality' rhetoric
+ being flung wildly about by some zealots.  Providing a balancing
+ perspective, as it were.

Not that I can tell. You're playing devil's advocate, at best, and only
in a theoretical sense.

The correct advice is: you want to protect your software against 
unauthorized use? go talk to a contract lawyer and have him/her draw
up a licensing agreement.

Matters little if your code is perl (and thus readable as-is) or a binary
distribution (which can be reverse engineered, and made readable).

James


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

Date: Tue, 25 Aug 1998 11:48:47 -0500
From: yong <yong@shell.com>
Subject: Re: Perl compiler
Message-Id: <35E2EAEF.6B9E6443@shell.com>

I don't know why everybody assumes Lily's hiding source code is because
she doesn't want to let others pirate her "property of knowledge". One
can also hide the source code for security reason since it may contain
passwords.

On the other hand, Lily didn't really ask an appropriate question here.
What's wrong with Malcolm Beattie's compiler? What errors do you get,
for example?

Yong

Lily Y. Fu wrote:

> Hi,
>
> Have you used Malcolm Beattie's Perl Compiler (a3 version)?
>
> I have a perl program, I want to compiler it into binary
> so that users of the program will not be able to
> read it as clean text.
>
> How can I do it?
>
> Thanks
> --
> Lily Fu
> The Institute for Genomic Research
> Voice Mail: (301) 838-3557
> Email: lily@tigr.org
>



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

Date: 25 Aug 1998 17:19:00 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl compiler
Message-Id: <6rurm4$6h5$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, yong <yong@shell.com> writes:
:One can also hide the source code for security reason since it may
:contain passwords.

Surely you're espousing neither security through obscurity, nor 
the writing down of passwords?

--tom
-- 
    Interestingly enough, since subroutine declarations can come anywhere,
    you wouldn't have to put BEGIN {} at the beginning, nor END {} at the
    end.  Interesting, no?  I wonder if Henry would like it. :-) --lwall 


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

Date: Tue, 25 Aug 1998 17:42:13 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl compiler
Message-Id: <VHCE1.113$Ed2.1319558@shore>

yong (yong@shell.com) wrote:
: One can also hide the source code for security reason since it may
: contain passwords.

Are you sure that this isn't security through obscurity?

Consider the following C code which will get compiled into an executable:

#include <stdio.h>

void check_password(char *pass) {
  char *checkpass = "foobar";
  if(!strcmp(pass, checkpass)) {
    printf("authenticated\n");
    exit(0);
  } else {
    printf("they do not match.  sorry.\n");
    exit(1);
  }
}

main() {
  char *do_pass = "foobar";
  check_password(do_pass);
}

Now, let's run `strings` on it:

$ strings authen
foobar
authenticated
they do not match.  sorry.

One might argue that "the person who looks at this output doesn't know
the real password", but my guess is that if they want to know, they'll
try each string that appears in the output.  :-)

Just my $0.02, tho.

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: Tue, 25 Aug 1998 15:55:31 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl documentation
Message-Id: <T7BE1.90$Ed2.1251341@shore>

I've also found that most spam has an X-UIDL header, and/or a warning
that such and such user didn't use HELO, etc.

The less instances of your mail address on DejaNews, the better.
After X-No-Archiving most of my postings, I get 1 or 2 pieces of spam
per day which is far better than the 10-20 per day I used to get.  And
this is without munging, either.  And of course procmail doesn't hurt
either; it generally picks up and kills the 1-2 pieces of spam I get
per day.  :-)

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: 25 Aug 1998 15:55:50 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: Perl documentation
Message-Id: <6rumq6$2i71@eccws1.dearborn.ford.com>

In article <35e53294.11586626@news.cableol.net>,
	dhawker@bigfoot.com (David Hawker) writes:
>On 23 Aug 1998 23:02:14 GMT, abigail@fnx.com (Abigail) felt the need to
>post:
>>David Hawker (dhawker@bigfoot.com) wrote on MDCCCXVIII September MCMXCIII
>>++ >> Uhm, what system comes without documentation for its system calls?
>>++ 
>>++ The one I'm using: MS-DOS and Windows95.
>>
>>Then complain to the vendors for shipping a system without documentation.
>
>I don't expect the vendors to bundle the interrupt guides, assembly
>language FAQs, windows api details, etc etc with a home computer.... maybe
>if I was buying one from a university for studying computing (which
>incidentally I shall be doing in a few weeks) but not from a high street
>store.

In defense of the vendors, they don't expect you to do any programming
on your system, either.  That's why it came with Windows 9[58].



-- 
+------------------------------------------------------------------------+
|  Clinton A. Pierce    |   "If you rush a Miracle Man,   | http://www.  |
|  cpierce1@ford.com    |     you get rotten miracles"    | dcicorp.com/ |
| fubar@ameritech.net   |--Miracle Max, The Princess Bride| ~clintp      |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*



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

Date: 25 Aug 1998 17:09:37 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: Perl documentation
Message-Id: <6rur4h$bv3@mercury.adc.com>

In article <6ruf5t$qfb$1@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
>
>I don't even get one a day.  In fact, I'm always surprised when 
>one makes it through.  Only a handful (not more than five, if that)
>make it through to me per *week*.  Considering that I receive upwards
>of three hundred messages per *day*, this is inconsequential noise
>at about one tiny quarter of one small percent.

You should probably mention that your filters are pretty aggressive,
and result in a high percentage of false positives.  If I'm not
mistaken, there are certain domains that you filter out entirely
because that domain harbors spammers, even though many of the messages
you might receive from those domains are completely legitimate
non-spam.  IIRC, you ignore everything from Netcom (my old ISP), among
many others.  Out of curiosity... I just switched to TCI internet
service.  Is that domain (home.com) in your filter, Tom?  

I mention this not as a complaint, but just to clarify.  If you want
to set up filters so that you're (almost) totally spam-free, you have
to be willing to throw a few babies out with the bath water.

Regarding the observation that posts to certain news groups generate
more spam, I can certainly vouch for that.  A few years back, I posted
to rec.humor a few times from my Netcom account.  Ever since then I've 
received 5 to 10 spams a day.  They seem to be about evenly split between 
advertisements for porn sites and spammer tools (bulk email software,
name lists, etc.), with the occasional MLM thrown in for variety.  Of
course, I'm assuming it was rec.humor.  Maybe Netcom sold my name to
somebody.  


        Brand
-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications, ATM Transport Division
|_____|   Richardson, Texas


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

Date: Tue, 25 Aug 1998 19:29:41 +0200
From: "Henrik =?iso-8859-1?Q?J=F8rgensen?=" <hekke@mail1.stofanet.dk>
Subject: Reading binary data...
Message-Id: <35E2F485.589E186D@mail1.stofanet.dk>

Hey.

I'm a newbie to perl, and I can't find anything in my 'Learning
PERL'-book about reading binary data from files.
Could anyone help?

Thanks in advance

--Hekke


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

Date: Tue, 25 Aug 1998 12:00:25 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <comdog-ya02408000R2508981200250001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6ruio4$2gi$1@nnrp1.dejanews.com>, iada@hplb.hpl.hp.com posted:

>   I'm very new to perl and haven't got my head around the joys of regular
>expressions -> I came across this example for removing the HTML tags from a
>string and can't work out how it works:
>
>$value=~s/<([^>]|\n)*>//g

the problem is that is doesn't work as intended.

to answer the regular expression question:  it matches a < followed
by anything that isn't a > up to an >, then replaces it with nothing.

to answer the HTML question:  this regex will fail for common cases
such as

   <img src="foo.gif" alt="<Image>">
   <!-- Here is my <a href="mailto:...">address</a> -->
   <script> if( a < b ) ... </script>

and so on and so on.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


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

Date: Tue, 25 Aug 1998 10:19:49 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <MPG.104c920dc17158389897e8@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <comdog-ya02408000R2508981200250001@news.panix.com> on Tue, 25 
Aug 1998 12:00:25 -0400, brian d foy <comdog@computerdog.com> says...
 ...
> to answer the HTML question:  this regex will fail for common cases
> such as
> 
>    <img src="foo.gif" alt="<Image>">
>    <!-- Here is my <a href="mailto:...">address</a> -->
>    <script> if( a < b ) ... </script>
> 
> and so on and so on.

Are any of these "common cases" valid HTML?

I just spent some time pondering the HTML 3.2 spec 
<URL:http://www.w3.org/TR/REC-html32.html> and found many references to 
syntactic categories CDATA and PCDATA, but couldn't find their 
definitions.  My understanding is that characters that have syntactic 
significance in HTML tags (specifically including < > " and &) may not 
appear in CDATA, but must be replaced by their representations (&lt; &gt; 
&quot; &amp;) or by their equivalent numerical escapes (&#decimal-
integer;).  The purpose and effect of this is to make HTML tags parsable 
by regexes.

I know that there are CPAN modules for parsing HTML, and several highly-
respected contributors here recommend them and scorn the use of regexes.  
I wonder if this is overkill, because the pathological cases cited above 
are not valid HTML.  Just as the perl parser is permitted to fail on 
invalid Perl syntax, shouldn't an HTML analyzer be permitted the same 
freedom on invalid HTML syntax?

-- 
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 25 Aug 1998 17:41:56 GMT
From: ABeldowi@newyorklife.com
Subject: Search and replace
Message-Id: <6rut14$gub$1@nnrp1.dejanews.com>

hi,
    i am trying to go through file, and everytime i come accross a url

(defined as =~ /http:\/\/.*\..*\.com/ )

I want to basically add html <a href..> tags to it.  so replace url with <a
href..>url</a> would be helpful.  I spent some time on this, and had the
following problems using various methods:

- while reading a file (one line at a time up to \n), a line with more than 1
url would only replace the last one.

- could not grab the matched url.  the file may have many different urls, so
I can't just replace with a static value...I need to capture the current
match to insert it between the <a href..>, then continue to the next unique
url.

Any help would be appreciated.
thanks
Andy
magicrat@hotmail.com

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 25 Aug 1998 18:23:09 +0200
From: Ulf Wendel <ulf.wendel@airbrush-zeitung.de>
Subject: Trouble with MIME:Entity
Message-Id: <35E2E4ED.8BF5DB86@airbrush-zeitung.de>

Hi!

I'd like to send some mails containting attachements. To do so I use
MIME:Entity but  the error messages won't  stop although I just copied
the example.,, It looks like MIME:Entity uses lots of other modules not
distributed with the "normal CPAN" installation. I got some of them but
it's stil not working.

Soft:
GNU Perl on     Win32 (NT4SP3) V 5.004_02
MIME:Entity      $Revision: 4.115 $ $Date: 1998/05/01 19:52:15 $
IO:                     IO-1_20 (latest)

Error message:
IO::Seekable::getopts missing at C:\Perl\lib/FileHandle.pm [...]

Any ideas?

Thanks!

Ulf Wendel



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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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