[8027] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1652 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 16 04:06:24 1998

Date: Fri, 16 Jan 98 01:00:35 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 16 Jan 1998     Volume: 8 Number: 1652

Today's topics:
     Re: Can I create a Linked List in Perl <rjk@coos.dartmouth.edu>
     Re: Can I create a Linked List in Perl (Abigail)
     Re: Command Line arguments - Perl for Win32 <tonylabb@infonline.net>
     Command Line Arguments in MacPerl (D. Graham Arts)
     Re: Comparing strings (John Moreno)
     dbmopen - novice usage <jscott@pixelny.com>
     Debugger?? <777snorris@post.cis.smu.edu>
     Re: getting info out of multidimentional assoc. array? (Martin Vorlaender)
     installing perl5.004_04 under Linux (Bernard M. Piller)
     Re: Logical 'and' in regex? (Abigail)
     More length of strings (newbie) <bhouston@bal.rtkl.com>
     Re: More length of strings (newbie) (brian d foy)
     Re: Newbie Perl-Java problem... <gregc@ekn.net>
     Newbie question <savage11@ibm.net>
     Re: perl -- a language for LEARNING programming? jnorman2@usit.net
     Re: Read STDERR from child? (Justin Vallon)
     READ THIS FIRST!!! <snorris@post.cis.smu.edu>
     Re: reg exp question <rjk@coos.dartmouth.edu>
     Re: Regular Expressions and the hyphen? <rjk@coos.dartmouth.edu>
     Re: Sorting question (Sort of..:-) <rjk@coos.dartmouth.edu>
     Re: source into binary code <*@qz.to>
     Re: source into binary code <rjk@coos.dartmouth.edu>
     Re: source into binary code <rjk@coos.dartmouth.edu>
     Re: source into binary code <rjk@coos.dartmouth.edu>
     Re: source into binary code (Abigail)
     Re: What's a good tutorial for perl <coldrick@frontrunner.com.au>
     Re: What's a good tutorial for perl (Simulated Snow)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 16 Jan 1998 00:09:03 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: Can I create a Linked List in Perl
Message-Id: <34BEEB70.A66A4F5D@coos.dartmouth.edu>

Abigail wrote:
> 
> They might be as functional, but using arrays instead of linked lists
> isn't always as efficient, as splice() in general take time linear
> to the size of the array. Linked lists *do* have their place.
> 
> Here's a simple implementation, all operations are O (1):

Don't forget there's more than one kind of efficiency. This linked list
implementation may be more efficient in terms of running time, but it's
less efficient with regards to memory usage, programmer effort and
maintainer effort.  :-)

I suppose if time is your main concern, you might want to use
actual linked lists.

Chipmunk


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

Date: 16 Jan 1998 07:08:34 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Can I create a Linked List in Perl
Message-Id: <69n11i$616$7@client3.news.psi.net>

Chipmunk (rjk@coos.dartmouth.edu) wrote on 1599 September 1993 in
<URL: news:34BEEB70.A66A4F5D@coos.dartmouth.edu>:
++ Abigail wrote:
++ > 
++ > They might be as functional, but using arrays instead of linked lists
++ > isn't always as efficient, as splice() in general take time linear
++ > to the size of the array. Linked lists *do* have their place.
++ > 
++ > Here's a simple implementation, all operations are O (1):
++ 
++ Don't forget there's more than one kind of efficiency. This linked list
++ implementation may be more efficient in terms of running time, but it's
++ less efficient with regards to memory usage, programmer effort and
++ maintainer effort.  :-)

Uhm, it took me 5 minutes to write those handful of functions; well
known algorithms find all over in textbooks hardly count as programming
effort. Ok, perhaps overkill for a one shot program, but once you've
put it in a module, how much time does 'use DataStructures::LinkedList;'
take to type?

The memory usage is more, but that's only a constant factor. Both
arrays and linked list take O (n) memory.

++ I suppose if time is your main concern, you might want to use
++ actual linked lists.

I tend to find a O (n) vs O (1) trade off something to seriously consider.

But that might just be my background.



Abigail
-- 
perl -weprint\<\<EOT\; -eJust -eanother -ePerl -eHacker -eEOT


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

Date: Thu, 15 Jan 1998 21:37:37 -0500
From: Tony Labbiento <tonylabb@infonline.net>
Subject: Re: Command Line arguments - Perl for Win32
Message-Id: <34BEC7F1.F83479BD@infonline.net>



GarryG wrote:

> I am trying to debug my perl scripts by running them in a command promt
> before,
> trying them with an html form, throught the web server.
>
> I can't get the script to accept any data values i pass it.
>
> When I do  "perl -w myscript.pl item=value"
>
> The script runs but with no data. It's such a simple thing but I can't see
> how its done, can someone out what i'm doing wrong.
>
> Thanks,
>
> --
> --
> Garry Goodwin
> Dynamic Computer Solutions Ltd
>
> http://www.dyna-cs.demon.co.uk

Command line arguments are held in @ARGV when the script is run in this
manner.

--
   ****************************************
   *    Tony Labbiento                    *
   *    Infinity Online, Inc.             *
   *    Programmer/Network Administrator  *
   ****************************************




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

Date: Thu, 15 Jan 1998 21:12:04 -0700
From: garts@direct.ca (D. Graham Arts)
Subject: Command Line Arguments in MacPerl
Message-Id: <garts-ya023080001501982112040001@news.direct.ca>

So here I am, sitting at my Mac, typing in some source code in MacPerl. All
of the code in the book has, so far, worked like a charm. I have no reason
to expect that the code requiring command line arguments would pose any
significant problems in MacPerl. Unfortunately, I don't know how to start
up a script that accepts command line arguments in MacPerl. I suspect that
it has something to do with the 'one liner' menu command, but I haven't
gotten it to work yet. So...

Can anybody tell me how to get a script running with command line arguments
in MacPerl?

Thanks, in advance, for your help.


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

Date: Fri, 16 Jan 1998 02:16:05 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Comparing strings
Message-Id: <1d2xerq.1prgez015khxzgN@roxboro0-027.dyn.interpath.net>

Matthew Cravit <mcravit@best.com> wrote:

> John Porter  <jdporter@min.net> wrote:
> >Kyle wrote:
> >Sure it's legal, but it's still wrong.  To compare strings, you should
> >use cmp, not ==
> 
> Looking at the perlop man page, I'm not clear what the advantage would be
> for using cmp to compare strings, instead of eq. The perlop man page says:

Well the solution he gave doesn't work (in fact it does the exact
opposite) since if they are equal it will return 0 and the if will fail.

But, if you don't mind skanky code, there /can/ be a advantage, it can
keep you from having to preform the test again - just use a assignment
inside the if statement like so if ($result=$s1 cmp $s2). This is really
only something you should think about if time is really critical.

-- 
John Moreno


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

Date: Fri, 16 Jan 1998 03:37:02 -0500
From: jon scott <jscott@pixelny.com>
Subject: dbmopen - novice usage
Message-Id: <34BF1C2E.AE8E7DAD@pixelny.com>

Hello -

I've recently inherited a Perl problem. While I am not a Perl programmer
- I've appropriated, re-written, modified many and have some superficial
familiarity. My actual expertise lies with ASP.

Here's the problem - A client has a script running on linux using Perl 4
- the script is very short and simple (on page) and uses dbmopen to
access and write or read a simple db.

However the site is being moved to a SunOS 5.5 machine using Perl 5.
As you might have expected by now, the dbmopen functionality is not
working:
the line in question is this:

dbmopen(%database,"data/$datafile",0666);

>From commented text in this script, I understand this should create a db
if it does not exist. Currently it is not.. I've found the simple
"friends.cgi" which I understand is a common test script.-  it uses:
dbmopen(FRIENDS,
        "friends", 0644);
which creates the .dir & .pag correctly when run from the command line.

Could this be a server config problem or my config problem to solve?

Thank you in advance for any input anyone may have.

Jon

Jonathan Scott
P I X EL, Inc.

http://interactive.pixelny.com




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

Date: Fri, 16 Jan 1998 00:11:13 -0600
From: "Scott Norris" <777snorris@post.cis.smu.edu>
Subject: Debugger??
Message-Id: <69mtid$t3m$1@hermes.seas.smu.edu>

1>  Is there a perl debugger program?? for Windows??




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

Date: Fri, 16 Jan 1998 05:17:45 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: getting info out of multidimentional assoc. array?
Message-Id: <34bedf69.524144494f47414741@radiogaga.harz.de>

Andrew S Gianni (agianni@xena.acsu.buffalo.edu) wrote:
: 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?

Perhaps...

I think you're confusing "ordinary" and associative arrays here. Your
"foreach" statement above alternating fetches keys and data from the
hash %service_array. It _can_ be done that way (Hey! This is perl!), but
this is overly complicated.

One way to do it with less confusion:

foreach $name (keys %service_array){...}  # $data = $service_array{$name}

And another one:

while (($name,$data) = each %service_array){...}


Hope this helps,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: Fri, 16 Jan 1998 09:20:24 +0100
From: bernard@look.in.signature (Bernard M. Piller)
Subject: installing perl5.004_04 under Linux
Message-Id: <19980116092024433856@cybertron132.cybertron.at>

Finally I give up and whine to this group.

For days now I tried to install perl5.004_04 (from CPAN) on my Linux box
(AMD K6, Kernel 2.0.33).
At first I had the "You have a BIG! problem" error during sh configure,
because some library paths were wrong.
When I found this out I finally got a config.sh and Makefile.
But during make I get a whole lot of error messages. I even installed
gcc 2.7.2.3 (had 2.7.2 before).

Could someone who succesfully installed Perl5.004 on Linux please send
me his/her config.sh?

Thank you very much,
Bernard

-- 
* bmp System Support               Vienna *
* http://www.bmpsystems.com       Austria *
* reply to: bernard at bmpsystems dot com *



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

Date: 16 Jan 1998 07:11:39 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Logical 'and' in regex?
Message-Id: <69n17b$616$8@client3.news.psi.net>

Eric Bohlman (ebohlman@netcom.com) wrote on 1599 September 1993 in
<URL: news:ebohlmanEMuy88.y7@netcom.com>:
++ Frank <FHeasley@chemistry.com> wrote:
++ : The following expression is essentially a logical "or":
++ 
++ : $breakfast =~ /bacon|eggs|hashbrowns|juice/;
++ 
++ : however, suppose I want ALL of the above for breakfast?  Is there a
++ : similar construct that AND's all of the items?
++ 
++ : Of course, one could evaluate every item, but that's a rather clumsy
++ : way to do it.
++ 
++ There's no way around it.  The very definition of AND is that every item has 
++ to be present.
++ 
++ If you only need to match literal strings rather than patterns, doing
++ multiple tests with index() would be faster than doing multiple regex
++ matches: 


Benchmark it, and you'd be surprised. index() can be over 30 times
*slower* than a regex.

Furthermore, your index solution doesn't cope with non overlapping
occurances.


Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


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

Date: Fri, 16 Jan 1998 01:56:46 -0500
From: Bill Houston <bhouston@bal.rtkl.com>
Subject: More length of strings (newbie)
Message-Id: <34BF04AE.19AD@bal.rtkl.com>

I understand that 

tr/0-9/0-9/ 

counts all the digits in a string but how do you find the length of
a string when any ascii code may be in the string?


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

Date: Fri, 16 Jan 1998 02:21:39 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: More length of strings (newbie)
Message-Id: <comdog-ya02408000R1601980221390001@news.panix.com>
Keywords: from just another new york perl hacker

In article <34BF04AE.19AD@bal.rtkl.com>, Bill Houston <bhouston@bal.rtkl.com> posted:

>... but how do you find the length of
>a string when any ascii code may be in the string?


hmmm.  i would probably use length() if i was in a hurry.

-- 
brian d foy                                  <comdog@computerdog.com>
but maybe there is a module...


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

Date: Fri, 16 Jan 1998 03:08:13 -0500
From: Greg Cobble /TechJD <gregc@ekn.net>
Subject: Re: Newbie Perl-Java problem...
Message-Id: <34BF156D.ED2EC537@ekn.net>

zz wrote:
> 
> I'm trying to run a simple perl script to run a java program as follows:
> 
> #!/bin/sh
> java testProgram
> 
> when I run it I get
> 
> can't find java in /usr/bin/../bin/green_threads/java
> 
> if I just type "java testProgram" at the command line it works fine. Is
> there some way to have a perl script exactly emulate keyboard input?


you didnt tell it perl scrit where the java is 
it assumes it's in the /usr/bin/../bin/green_threads/java


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

Date: Thu, 15 Jan 1998 23:52:40 -0500
From: Newbie <savage11@ibm.net>
Subject: Newbie question
Message-Id: <34BEE798.68BE@ibm.net>

I hope this question is not too out of wack or 
inappropriate for this group.

I am building a web site that will allow my authorized clients 
(lets say 100) to input a product pricing LIST and a
NEWSLETTER online.  These two pieces of info will be
dynamically posted to the clients location on my site.  
So each client will have two web pages.  If and when they re-submit
a new List and a new Newsletter, the client ideally will overwrite 
their existing two web pages.

My question is regarding the best implementation. I have come across 
authorization scripts that send a user to a certain web page depending
on their authorization ID - http://selena.mcp.com/Scripts/scripts.html . 
I am looking for something similar but it will send the input data
(a list and notice in this case) to the correct client page locations.

In other words, is it possible for a variation of 
these steps to occur using Perl?  

1) user authorizes
2) user inputs List onto form
3) user inputs Newsletter onto form
4) user submits form
5) form is dynamically posted to client's List and Newsletter pages
   based on their authorization code.

Thanks for your time in reading this post!
Any implementation ideas would be greatly appreciated.

Newbie


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

Date: Fri, 16 Jan 1998 05:07:18 GMT
From: jnorman2@usit.net
Subject: Re: perl -- a language for LEARNING programming?
Message-Id: <34bee8da.14294566@nntp.usit.net>

notsew@wwa.com wrote:

>what i'm wondering, i guess, is whether my knowledge of perl (and
>other languages, many of whose basic constructs derive from c/c++)
>would be enough to get me through some of the "theory" i'm interested
>in learning.  should i pick up a book in data structures, for example,
>where examples are given entirely in c, would i be lost, or would
>things in essence look pretty familiar?  i mean, a for loop is a for
>loop.  similarly, would i be able to convince a professor (whose
>consent i'd need to take his class without the requisite c/c++
>knowledge) of as much?




Well, I am not, by ny means, and exper programmer. I am in my 3rd year
as an undergrad CSCI student. I've been programming with C++ for 3
semesters and have just started learning PERL.

So if you card... here is my opinion.

Ever since my first class, I have loved programming, and I have
ventured into a few other languages (COBOL, BASIC, PASCAL, etc) and I
havent found anything that gives me that "Whole grain goodness"
feeling that I get from C++.

As far as PERL goes, I am amazed at the ways it has simplified so many
things. But with that simplicity, you lose a certain level of
functionality. PERL is GREAT! for what its for, but there are some
applications that PERL just woudnt be appropriate for.


I say... get a C/C++ compiler (I recommend Borland) and a nutshell
book and learn what you can. See what C++ is capable of, you may find
that it will in fact help you on the job. And if you feel that it is a
waste, then dont persue it. But, if you like it, then go ahead and
take a class.


But these are just the hunble rambling of an undergrad. Other
opinions/criticisms on my opinions are welcome. I would love to
correspond with others who actually program for a living.


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

Date: Fri, 16 Jan 1998 01:12:22 -0500
From: vallon@mindspring.com (Justin Vallon)
Subject: Re: Read STDERR from child?
Message-Id: <19980116011222120206@user-38lcf6g.dialup.mindspring.com>

David, I think this is what you were asking for:

* How do I capture stderr, but leave stdout and stdin alone?

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

local $cmd = 'grep . /tmp/foo /etc/motd /tmp/bar';

$| = 1;

print "Before\n";
local $stderr = `$cmd 3>&1 1>&2 2>&3 3>&-`;
# "Redirect" STDOUT to 3, STDERR to STDOUT, 3 to STDERR, and close 3
print "After\n";
print "stderr is '$stderr'\n";

I get:

Before
/etc/motd:                                 W A R N I N G
/etc/motd:[blah blah blah]
After
stderr is 'grep: can't open /tmp/foo
grep: can't open /tmp/bar
'

You can even replace $cmd with something interactive.  $cmd will get
stdin from perl's STDIN, and its STDOUT will go to perl's STDOUT.  Only
STDERR will be captured in $stderr.

-- 
-Justin
vallon@mindspring.com


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

Date: Fri, 16 Jan 1998 01:01:46 -0600
From: "Scott Norris" <snorris@post.cis.smu.edu>
Subject: READ THIS FIRST!!!
Message-Id: <69n0h2$u0i$1@hermes.seas.smu.edu>

My email address is not 777snorris@post.cis.smu.edu. There is no 777 in it.
This message should have the correct "reply to:" address.




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

Date: Fri, 16 Jan 1998 00:45:30 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: reg exp question
Message-Id: <34BEF3FA.29F890B8@coos.dartmouth.edu>

Eric Bohlman wrote:
> Chipmunk <rjk@coos.dartmouth.edu> wrote:
> : Ian Goldstein wrote:
> : > I want to extract all instances of duplicate consecutive
> : > characters from a string. I came up with a simple algorithm,
> : > but was wondering if there was a "shorter" method.
> : >
> : > while ( /([a-z])\1/ )  {
> :
> : while (/([a-z])\1/g) {
> 
> while (/([a-z])(?=\1)/g) {
> which will count runs of length greater than two.

Assuming that is what the original poster wanted to do.  :-)

Chipmunk


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

Date: Fri, 16 Jan 1998 01:35:15 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Paul Thomas <paul@cue.com>
Subject: Re: Regular Expressions and the hyphen?
Message-Id: <34BEFFA3.AD1F1FC6@coos.dartmouth.edu>

Paul Thomas wrote:
> 
> $lstname = "tEst2";
> [...]
> if ($name =~ /$lstname\b/i ) {print "$name\n"}; #print "$name\n"; }
> 
> With this I just want to print $name, however some of the directories
> are named 'somedir' and 'somedir-digest'. So in my above routine,
> 'somedir' and 'somedir-digest' are always printed even though all I
> want is 'somedir'. It seems that /$lstname\b/i does not condider a
> hyphen following $lstname a word boundry and goes ahead and matches
> anything resembline $lstname that is hyhenated like $lstname-digest.
> I want to set a word boundry so /$lstname\b/i on matches $lstname and
> not $lstname-digest.

A hyphen following $lstname *is* considered a word boundary, which is 
why the regular expression is matching.

A word boundary is the position between a word character and a
non-word character.  Word characters are [a-zA-Z0-9_].
Non-word characters are everything else, including hyphen.

Try this instead:

$name =~ /$lstname\b(?!-)/i

(?!-) is a zero-width negative lookahead assertion, which says
'match only if there is not a hyphen here'.

See the perlre manpage for more info.

Chipmunk


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

Date: Fri, 16 Jan 1998 01:23:12 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Sheldon <seriously@usa.net>
Subject: Re: Sorting question (Sort of..:-)
Message-Id: <34BEFCD0.B79E2144@coos.dartmouth.edu>

[posted and mailed]

Sheldon wrote:
> 
>    I am attempting to sort together two large files.. On a simplest level
> they can be considered to be merely two long files of words, one word per
> line.  They are both already alphabetized (which is all that I am hoping
> for) but I want to combine them into one file. The problems that I am
> running into are that:
>    I can't just read them into memory and sort them as arrays, since they
> are too large. As far as I can think, that leaves me reading one line out
> of each file and comparing that with one from the other file.  But, since
> they are of differing lengths (the files) I have not been able to find any
> good loop that would exit properly upon reaching the end whichever file
> happens to be shorter.

# assumes files are sorted in ASCII order

open(FILE1, $file1) or die "Unable to open $file1: $!";
open(FILE2, $file2) or die "Unable to open $file2: $1";

$line1 = <FILE1>;            # read the first line from each file
$line2 = <FILE2>;

while (defined($line1) and defined($line2)) {
                             # while lines left in both files
  if ($line1 le $line2) {    #   line1 comes first
    print $line1;            #     so print line1
    $line1 = <FILE1>;        #     and get the next one
  } else {                   #   line2 comes first
    print $line2;            #     so print line2
    $line2 = <FILE2>;        #     and get the next one
  }
}

                             # at end of one or both files

if (defined($line1)) {       # lines left in file1
  print $line1;              #   print the current line
  print while (<FILE1>);     #   print all the rest
} elsif (defined($line2)) {  # lines left in file2
  print $line2;              #   print the current line
  print while (<FILE2>);     #   print all the rest
}

Chipmunk


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

Date: 16 Jan 1998 04:58:50 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: source into binary code
Message-Id: <qz$9801152350@qz.little-neck.ny.us>

Jim Michael <genepool@netcom.com> wrote:
> Case in point: You write a program (in Perl, of course) which you would 
> like to distribute over the net which you would like to expire after x 
> days if there is no registration key. Your goal is to maximize the number 
> of registrations, not to make the registration process totally 
> hacker-proof. How can you best obfuscate the code to prevent the typical 
> GUI interface OS user from stealing your code and make it moderately 
> difficult (the payoff isn't quite worth the time involved for use of the 
> program) for a semi-skilled hacker?

Heavy OO with an embeded perl instance invoked from an XS module.

Elijah
------
and throw in some registration dependencies in the Y2K "bug" fixes


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

Date: Fri, 16 Jan 1998 00:17:05 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: source into binary code
Message-Id: <34BEED51.E0E77FDF@coos.dartmouth.edu>

Dan Boorstein wrote:
> 
> > [compiling the Perl code...]
> > b) only hides it from people who know as little about such
> >    things as you
> 
> exactly my point. it is a barrier in gaining knowledge. that is
> security. not foolproof, not even good, but still security.
> key cryptography works exactly as you state in 'b'. it hides information
> from those who know less about such things (i.e., the key).

Then you agree with what everyone else has been saying, which is
that compiling the source code is not a good way of providing
security.

Chipmunk


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

Date: Fri, 16 Jan 1998 00:20:38 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: source into binary code
Message-Id: <34BEEE27.CBB1587E@coos.dartmouth.edu>

Andrew Johnson wrote:
> 
> compilation of source has its uses, obviously,...but I would not
> count hiding security problems (real or potential) among them, nor
> would I recommend it as even a minimalist step in that direction.

I think you're making the mistaken assumption that people who 
compile their source code for purpose of security are trying to
hide security holes in their code.

I believe in many cases the security that is sought is not to keep
people from exploiting holes in the program, but to keep people
from copying or modifying the code.

In either case it's not a good way to achieve security, but
I think it's an important distinction.

Chipmunk


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

Date: Fri, 16 Jan 1998 00:27:34 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: source into binary code
Message-Id: <34BEEFC7.11B0029F@coos.dartmouth.edu>

brian d foy wrote:
> 
> In article <ken-1501981848490001@news.swarthmore.edu>, ken@forum.swarthmore.edu (Ken) posted:
> 
> >Dan Boorstein <dboorstein@ixl.com> posted:
> >>*heh*  forget about the dictionary.  your enemy is a hacker - a person
> >>with seemingly unlimited curiousity, unending devotion to the task
> >>at hand, and a master of technical trivia.
> 
> um, i said that.
> 
> >How in the world would you know that the enemy is a hacker??  Perhaps the
> >original poster was a high school teacher teaching a class on programming,
> >and he wanted to make some simple "black box" scripts to give to his
> >students.  You know, "Run this program a bunch of times and figure out
> >what it does.  Then write a program in Perl that does the same thing."
> 
> sounds like hacking to me.

By the definition of hacker you laid claim to above?

The student may have seemingly unlimited curiosity, although this is a
homework problem.  How enthusiastic will he get?

The student will probably not have an unending devotion to the task -
see above.

The student will most likely not be a master of technical trivia.
That's why he's a student.

If the student was already capable of hacking the compiled code,
he probably wouldn't be taking that class.

Chipmunk


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

Date: 16 Jan 1998 07:20:49 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: source into binary code
Message-Id: <69n1oh$616$9@client3.news.psi.net>

brian d foy wrote:
++ 
++ In article <ken-1501981848490001@news.swarthmore.edu>, ken@forum.swarthmore.edu (Ken) posted:
++ 
++ >How in the world would you know that the enemy is a hacker??  Perhaps the
++ >original poster was a high school teacher teaching a class on programming,
++ >and he wanted to make some simple "black box" scripts to give to his
++ >students.  You know, "Run this program a bunch of times and figure out
++ >what it does.  Then write a program in Perl that does the same thing."


Bleh. You don't need to run anything or decompile that box.
There is about one thing you can do:

      perl -we 'system "black_box", @ARGV'

As it is impossible to determine what an algorithm does based on
a limited set of inputs.


(Perl in high school??? Where?)

Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'


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

Date: Fri, 16 Jan 1998 17:38:43 +1100
From: David Coldrick <coldrick@frontrunner.com.au>
To: Steve Michaels <dyang@mork.uni.uiuc.edu>
Subject: Re: What's a good tutorial for perl
Message-Id: <34BF0072.C3F1F886@frontrunner.com.au>

Best I've seen is Nigel Chapman's "PERL - The Programmer's Companion"; great
sense of humour, and just the right level. See
http://www.amazon.com/exec/obidos/ISBN=047197563X/7747-7077265-466659

Regards,
David

Steve Michaels wrote:

> I have basic programming experience (C, C++, pascal, assembly) and I was
> wondering where I could get a good perl tutorial (on the web or in book
> format) that is concise but has all the information.
>
> steve





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

Date: Thu, 15 Jan 1998 23:46:32 -0800
From: SnowSim@halcyon.com (Simulated Snow)
Subject: Re: What's a good tutorial for perl
Message-Id: <SnowSim-1501982346330001@blv-lx103-ip37.nwnexus.net>

In article <34BF0072.C3F1F886@frontrunner.com.au>, David Coldrick
<coldrick@frontrunner.com.au> wrote:

> Best I've seen is Nigel Chapman's "PERL - The Programmer's Companion"

I'll second that...very well done

-- 
"I know of no safe depository of the ultimate powers of the society but the
people themselves; and if we think them not enlightened enough to exercise their
control with a wholesome discretion, the remedy is not to take it from them but
to inform their discretion." - Thomas Jefferson


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

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

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