[15662] in Perl-Users-Digest
Perl-Users Digest, Issue: 3075 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 17 11:05:27 2000
Date: Wed, 17 May 2000 08:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <958575909-v9-i3075@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 17 May 2000 Volume: 9 Number: 3075
Today's topics:
Re:   - what is it? <bert@scanlaser.nl>
Re: *Beginner help with HASHES <bmb@dataserv.libs.uga.edu>
Re: *Please Help.New to Perl and CGI* (SaintJAVA)
Re: Annoying -w messages from standard distributed modu <rootbeer@redcat.com>
converting CALS (SGML) to formated HTML tables... <kmojar@bmjgroup.com>
Re: converting CALS (SGML) to formated HTML tables... (Ned Konz)
Re: Error install module using MCPAN <rootbeer@redcat.com>
HELP:apache don't evaluate my cgi-scripts <lwo@ikp.uni-bonn.de>
Re: how to parse HTMLish name="value" pairs <jeff@vpservices.com>
Re: how to parse HTMLish name="value" pairs <godzilla@stomp.stomp.tokyo>
Re: I want to split on more than one word (Tad McClellan)
Re: I want to split on more than one word (Tad McClellan)
Re: IPC: 1 to n communication <billy@arnis-bsl.com>
Mixed results! <hassoun@sympatico.ca>
Re: Mixed results! <tony_curtis32@yahoo.com>
Re: Mixed results! <hassoun@sympatico.ca>
Re: MS Documents to text---help <wjwolfe1@bluestem.prairienet.org>
Re: Odd behaviour, I think its my use of map()? <care227@attglobal.net>
Re: Perl and binary files <jakemsr@earthlink.net>
Re: Perl and binary files <jakemsr@earthlink.net>
Re: Perl and binary files <jeff@vpservices.com>
Re: Protecting Source Code? (Tad McClellan)
Re: Protecting Source Code? newsposter@cthulhu.demon.nl
Re: Protecting Source Code? <rootbeer@redcat.com>
txt file download question <l.idema@softhome.net>
Re: txt file download question (Sam Holden)
Re: Unexpected behavior with redirected stdio and duped <rootbeer@redcat.com>
Re: upload to server <russ_jones@rac.ray.com>
Re: Using OCX object <rootbeer@redcat.com>
Re: Way the ^&*$^%$^% off topic [Was: circa 1935 - 1940 <schmickl@magnet.at>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 17 May 2000 15:43:30 +0200
From: Bert IJff <bert@scanlaser.nl>
Subject: Re:   - what is it?
Message-Id: <3922A202.E455D66@scanlaser.nl>
Paul,
subroutines are named with an initial '&'
see e.g. the perldiag and perlcall manualpages.
Quote from the Safe.pm file (manual part):
share (VARNAME, ...)
This shares the variable(s) in the argument list with the compartment.
Each VARNAME must be the B<name> of a variable with a leading type
identifier included. Examples of legal variable names are '$foo' for
a scalar, '@foo' for an array, '%foo' for a hash, '&foo' for a
subroutine and '*foo' for a glob (i.e. all symbol table entries
associated with "foo", including scalar, array, hash, sub and
filehandle).
As an example, try this code
#!/usr/local/bin/perl -w
use strict;
# set up a hash with subroutines to be called when specific values
come along
my %Subcaller = (
2 => \ ,
4 => \>,
6 => \<
);
# next two lines do the same thing: they call the subroutine nbsp
nbsp();
foreach (1, 2, 3, 4, 5, 6, 7)
{
my $proc;
if (defined($proc = $Subcaller{$_}) ) { # is there an associated
sub?
&$proc; # well, execute it
} else {
print "No subroutine for $_\n";
}
}
sub nbsp { print "Found sub nbsp\n"; }
sub lt { print "Found sub lt\n"; }
sub gt { print "Found sub gt\n"; }
__END__
This gives as output
Found sub nbsp
Found sub nbsp
No subroutine for 1
Found sub nbsp
No subroutine for 3
Found sub gt
No subroutine for 5
Found sub lt
No subroutine for 7
Hope this helps,
Bert IJff
(another novice in Perl)
Jonathan Stowe wrote:
>
> On Fri, 12 May 2000 16:20:07 -0700 Larry Rosler wrote:
> > In article
> > <15F82521AF5D18AC.ECEC2093AACED09A.D67F8BB484DE18E5@lp.airnews.net> on
> > Fri, 12 May 2000 17:24:22 -0500, Paul Phillips <paul@partitura.com>
> > says...
> >> I am a Perl novice. In looking at some Perl programs I have seen this
> >> construct:
> >>
> >>  
> >>
> >> I've looked in my llama and camel books and do not find a reference to
> >> it.
> >>
> >> Can someone tell me what it does?
> >
> > That isn't Perl. It is incorrect HTML.
> >
> P
> sub nbsp
> {
> return ' '
> }
>
> perhaps ;-?
>
> /J\
> --
> We're laughing with her, Marge. There's a big difference. Ha ha
> ha! ...with her.
> --
> fortune oscar homer
------------------------------
Date: Wed, 17 May 2000 09:52:02 -0400
From: Brad Baxter <bmb@dataserv.libs.uga.edu>
Subject: Re: *Beginner help with HASHES
Message-Id: <Pine.GSO.4.21.0005170936150.29100-100000@dataserv.libs.uga.edu>
On Wed, 17 May 2000 plantzy@uamail.albany.edu wrote:
> Thanks for your response, but I dont know if this will work. I am pulling all
> the data out of a database so the name of the groups and operators could
> change so I cant hard code anything.
FCOL, you're supposed to figure that out! Now I'm going to get points deducted
for spoon feeding. :-)
1 #!/usr/local/bin/perl -w
2 use strict;
3
4 my %hash;
5 my @groups = split ' ', scalar <DATA>;
6 while ( <DATA> ) {
7 my( $oprid, $name, @g ) = split;
8 $hash{ $oprid }{name} = $name;
9 $hash{ $oprid }{groups}{ $_ }++ for @g;
10 } # while
11
12 my $fmt = "%-10s";
13
14 printf $fmt x (@groups+2), ( 'OPRID', 'NAME', sort @groups );
15 print "\n", '-' x 60, "\n";
16
17 foreach my $oprid ( sort keys %hash ) {
18 printf $fmt x 2, $oprid, $hash{ $oprid }{name};
19 printf $fmt, $hash{ $oprid }{groups}{ $_ } ? 'X' : ''
20 for sort @groups;
21 print "\n";
22 } # foreach oprid
23
24 __DATA__
25 GROUP1 GROUP2 GROUP3 GROUP4
26 123 TEST123 GROUP1 GROUP3
27 ABC DUMMYA GROUP2
28 XYZ TESTX GROUP1 GROUP4
Output:
OPRID NAME GROUP1 GROUP2 GROUP3 GROUP4
------------------------------------------------------------
123 TEST123 X X
ABC DUMMYA X
XYZ TESTX X X
See, no hard-coded groups or operators (what do they operate?)
Obviously, your database doesn't look like lines 25-28. Applying this
to your specific situation is your homework assignment. Enjoy!
Extra credit: I sort @groups more than once; how would you do that
differently?
--
Brad
------------------------------
Date: 17 May 2000 13:57:53 GMT
From: saintjava@aol.com (SaintJAVA)
Subject: Re: *Please Help.New to Perl and CGI*
Message-Id: <20000517095753.15111.00000431@ng-md1.aol.com>
Brian, Evil.
Thanks both of you for answering.
Evil... I guess I'll give Apache a shot maybe I'll have better luck.
Brian... yeah, the file/folder permissions in the PWS are set by default to
execute and run scripts in the cgi-bin directory.
------------------------------
Date: Wed, 17 May 2000 07:26:48 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Annoying -w messages from standard distributed modules
Message-Id: <Pine.GSO.4.10.10005170725550.25459-100000@user2.teleport.com>
On Wed, 17 May 2000, John Lin wrote:
> So can I say '$^W=0' happens at run time
If it's not in a BEGIN block, or the equivalent.
> and 'no warnings' at compiling time?
Sounds right to me. Of course, they're doing different sorts of things;
the warnings manpage tells more. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 17 May 2000 14:44:32 +0100
From: Kourosh A Mojar <kmojar@bmjgroup.com>
Subject: converting CALS (SGML) to formated HTML tables...
Message-Id: <3922A240.F5D7436A@bmjgroup.com>
Dear all,
I am currently writing my own (perl) script to batch process SGML data
to formatted HTML pages. Im interested in what available applications,
perl support, and issues/techniques there is for converting CALS (SGML)
tables to formatted HTML tables? I am generally interested in any
information regarding this subject.
I look forward to any feedback and solutions regarding this. Thanking
you in advance and for your kind attention.
Kourosh A Mojar
------------------------------
Date: Wed, 17 May 2000 14:45:19 GMT
From: ned@bike-nomad.com (Ned Konz)
Subject: Re: converting CALS (SGML) to formated HTML tables...
Message-Id: <slrn8i5bvd.6jj.ned@ned.bike-nomad.com>
On Wed, 17 May 2000 14:44:32 +0100, Kourosh A Mojar wrote:
>I am currently writing my own (perl) script to batch process SGML data
>to formatted HTML pages. Im interested in what available applications,
>perl support, and issues/techniques there is for converting CALS (SGML)
>tables to formatted HTML tables? I am generally interested in any
>information regarding this subject.
http://search.cpan.org/search?mode=module&query=SGML
--
Ned Konz
currently: Stanwood, WA
email: ned@bike-nomad.com
homepage: http://bike-nomad.com, Perl homepage: http://bike-nomad.com/perl
------------------------------
Date: Wed, 17 May 2000 07:51:43 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Error install module using MCPAN
Message-Id: <Pine.GSO.4.10.10005170748040.25459-100000@user2.teleport.com>
On Wed, 17 May 2000, linn smux wrote:
> I've a problem installing any module using perl -MCPAN -e shell . It prompt
> me with this message
>
> Error reading from /root/.cpan/sources/authors/01mailrc.txt
Probably that file (or one of the directories) isn't set to give you
permission to read.
If your admin won't change that for you, you can probably set up your own
config file for the CPAN module, which will let you specify a different
directory than root's. See the section on CONFIGURATION in the docs.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 17 May 2000 14:54:02 +0200
From: lwo <lwo@ikp.uni-bonn.de>
Subject: HELP:apache don't evaluate my cgi-scripts
Message-Id: <3922966A.D338295C@ikp.uni-bonn.de>
Hi everybody,
I'm using the win32 version of the apache Webserver. My Perl-path is in
$PATH.
The first line of my scripts looks like:
#!c:\Perl\bin\perl.exe
When I evaluate apache shows error 500 and adds the following line to
error.log:
'Premature end of script headers: c:/programme/apache
group/apache/cgi-bin/test.pl'
Where is the mistake ? Can anybody help me?
Thanks in advance, Lars
------------------------------
Date: Wed, 17 May 2000 07:08:17 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: how to parse HTMLish name="value" pairs
Message-Id: <3922A7D1.7EAFF813@vpservices.com>
Stefan Rieken wrote:
>
> Hello,
>
> I am making a cgi script that should allow people of average
> intelligence to (design and) set up a website so that people who are not
> necessarilly intelligent at all can manage the contens.
>
> Good, skip intro. I have to parse this kind of things:
>
> <!--xxx NAME="foo" VALUE="bar" HEIGHT="33"--> ..etc.
>
> Currently, I do it like this (e.g. to get the NAME param):
>
> ($nothing, $seperator, $name, $seperator) = split
> (/(<!--xxx.*?name.*?=.*?"|".*?-->)/i, $lineoftext);
You appear to be not only reinventing the wheel but also reinventing the
wood it is made out of. There are many well established templating
modules which already do the kind of thing you are trying to do there.
Even if you wanted to create another templating module for some reason,
your approach to using regex and splits and such to parse complex tags
is *bound* to fail given that your audience is newbies who will
invariably do things with the tags that will break your parsing (e.g. to
mention only the simplest that will break what you have there, put the
tag on two lines). If you really want to do that kind of thing, use XML
tags and XML::Parser to read them.
> (This my first dive into Perl, so spare me a little, OK? :-)
Ambitious bloke, aren't you :-). I'm sorry to be disparaging it seems
to me that what you are trying to do has a) been done before by some
very experienced people and b) is a lot more complex a task than it
looks at first sight.
--
Jeff
------------------------------
Date: Wed, 17 May 2000 07:34:41 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: how to parse HTMLish name="value" pairs
Message-Id: <3922AE01.14987A38@stomp.stomp.tokyo>
Stefan Rieken wrote:
> <!--xxx NAME="foo" VALUE="bar" HEIGHT="33"--> ..etc.
> Currently, I do it like this (e.g. to get the NAME param):
> ($nothing, $seperator, $name, $seperator) = split
> (/(<!--xxx.*?name.*?=.*?"|".*?-->)/i, $lineoftext);
> It works, but it's far from aestethic; I only need the $name, and I have
> to repeat it for each name/ value pair I want. Anyone has good
> suggestions?
I've written a simple demonstration
script for you, which shows two methods
of many methods for approaching this.
I added both NAME and VALUE for better
clarity should you need to grab more
than one variable.
This script will work perfectly for
perfect input. However, the first
time, most likely your first subscriber,
decides to type in the Lord's Prayer
in Oriental Calligraphy for "foo" and,
decides to type in Isamov's Three Laws
Of Robotics for "bar", I suspect you
will discover some problems.
It would be a good idea to control your
subscriber input strictly and in a well
planned and organized manner with serious
anticipation of God Awful input.
Godzilla!
Test script first, printed results last.
Test Script:
________________
#!/usr/local/bin/perl
print "Content-Type: text/plain\n\n";
print "EXAMPLE ONE: \n";
$test_string1 = "
<!--xxx NAME=\"foo1\" VALUE=\"bar1\" HEIGHT=\"33\"--> eceteras 1
<!--xxx NAME=\"foo2\" VALUE=\"bar2\" HEIGHT=\"33\"--> eceteras 2
<!--xxx NAME=\"foo3\" VALUE=\"bar3\" HEIGHT=\"33\"--> eceteras 3";
@Test = split (/\n/, $test_string1);
$line_counter =1;
foreach $test_line (@Test)
{
if ($test_line =~ /NAME="(.*)" VALUE="(.*)" /)
{
$name = $1;
$value = $2;
print "
Line $line_counter:
NAME is: $name
VALUE is: $value
\n";
$line_counter++;
}
}
print "\n\nEXAMPLE TWO:\n";
$test_string2 = "<!--xxx NAME=\"foo\" VALUE=\"bar\" HEIGHT=\"33\"-->
eceteras";
if ($test_string2 =~ /NAME="(.*)" VALUE="(.*)" /)
{
print "
NAME is: $1
VALUE is: $2";
}
exit;
Printed Results:
________________
EXAMPLE ONE:
Line 1:
NAME is: foo1
VALUE is: bar1
Line 2:
NAME is: foo2
VALUE is: bar2
Line 3:
NAME is: foo3
VALUE is: bar3
EXAMPLE TWO:
NAME is: foo
VALUE is: bar
------------------------------
Date: Wed, 17 May 2000 09:03:19 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: I want to split on more than one word
Message-Id: <slrn8i564n.25i.tadmc@magna.metronet.com>
On Tue, 16 May 2000 19:05:37 -0700, Cure <cure@texas.net> wrote:
> $cure = "substr hi there";
>
>
> I want to split on more than one word
>i want to bealbe to split on substr and hi and there
>is that possible?
Yes it is possible.
When you split on those strings, you get a three-element list
where the first element is the empty string and the other two
elements are a single space.
Why would you want to do that?
I think you want to split on _spaces_, not on those strings.
perldoc -f split
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 17 May 2000 08:59:09 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: I want to split on more than one word
Message-Id: <slrn8i55st.25i.tadmc@magna.metronet.com>
On Tue, 16 May 2000 17:56:27 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
>In article <3921FE71.28A86B63@texas.net> on Tue, 16 May 2000 19:05:37 -
>0700, Cure <cure@texas.net> says...
>Why are you not doing even the minimal amount of work needed to answer
>this question?
Because his standard MO is to ask questions on Usenet first.
He has done this a whole bunch of times.
Reading the manual is for sissies.
I have made the appropriate entry in my newsreader's config file.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 17 May 2000 13:10:25 GMT
From: Ilja <billy@arnis-bsl.com>
Subject: Re: IPC: 1 to n communication
Message-Id: <8fu5ni$n8$1@nnrp1.deja.com>
In article <3922934F.68ADE599@cat.at>,
Gernot Homma <gernot@cat.at> wrote:
> This is a multi-part message in MIME format.
> --------------76D412D701CFBDA4AF6D9545
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hello,
>
> i have a process that should pass some data to n other processes, which
> do something with the data. which mechanism is the best to this.
>
> named pipes:
> don't work (afaik), because one reader process gets the information,
> the other's not
>
If I guess right, you want to pass *the same* data from one process to n
others.
Just use shared memory (if supported on your platform). You may use Perl
functions (shmget etc.) or maybe better one of the modules from CPAN:
IPC::ShareLite
IPC::Shareable
Good luck.
Ilja.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 May 2000 14:31:35 GMT
From: Hassoun <hassoun@sympatico.ca>
Subject: Mixed results!
Message-Id: <3922ACC0.363634A@sympatico.ca>
hi
after collecting data from an HTML form, my cgi script returns all the
data but in a random order. is there a way to return it in the same
sequence of the form? any clues?
tia
Hassoun
------------------------------
Date: 17 May 2000 09:36:24 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Mixed results!
Message-Id: <87u2fxnt07.fsf@shleppie.uh.edu>
>> On Wed, 17 May 2000 14:31:35 GMT,
>> Hassoun <hassoun@sympatico.ca> said:
> hi after collecting data from an HTML form, my cgi
> script returns all the data but in a random order. is
> there a way to return it in the same sequence of the
> form?
Nope, you get whatever the browser/user-agent sends to
you. I suppose you could think of it this way: do you
want the data returned in the order it was textually
specified in the HTML, or in the order which this
particular browser/user-agent has rendered the form? The
simplest thing is just to make sure of completeness.
> any clues?
You could keep an array of the fields in the form, over
which you iterate to process them in the required order.
hth
t
------------------------------
Date: Wed, 17 May 2000 14:49:39 GMT
From: Hassoun <hassoun@sympatico.ca>
Subject: Re: Mixed results!
Message-Id: <3922B0F7.2371C117@sympatico.ca>
hi Tony
i should have said that the resultS are to be written to a sorted table,
that is why i need the data to be in the textual order specified in the
HTML.
i will try the array approach
thanks for the new insight.
Tony Curtis wrote:
>
> >> On Wed, 17 May 2000 14:31:35 GMT,
> >> Hassoun <hassoun@sympatico.ca> said:
>
> > hi after collecting data from an HTML form, my cgi
> > script returns all the data but in a random order. is
> > there a way to return it in the same sequence of the
> > form?
>
> Nope, you get whatever the browser/user-agent sends to
> you. I suppose you could think of it this way: do you
> want the data returned in the order it was textually
> specified in the HTML, or in the order which this
> particular browser/user-agent has rendered the form? The
> simplest thing is just to make sure of completeness.
>
> > any clues?
>
> You could keep an array of the fields in the form, over
> which you iterate to process them in the required order.
>
> hth
> t
------------------------------
Date: Wed, 17 May 2000 13:15:25 GMT
From: "William J. Wolfe" <wjwolfe1@bluestem.prairienet.org>
Subject: Re: MS Documents to text---help
Message-Id: <NXwU4.596$p92.115@firefly>
Try "Save As" into ASCII, DOS, or generic word-processing format (which
keeps the soft returns at the line ends).
-Bill
In microsoft.public.word.conversions JB Goss <jgoss@goss-com.com> wrote:
: I am looking for something simple to strip the crud out of MS documents and
: just leave the text... any ideas?
: Thanks,
: JB
------------------------------
Date: Wed, 17 May 2000 10:16:09 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Odd behaviour, I think its my use of map()?
Message-Id: <3922A9A9.1C05ABBB@attglobal.net>
Michael Carman wrote:
> (Borrowing from an earlier post)
> if (-e $filename){
> local $/ = "\n";
Holy cow it worked! I can't thank you enough. Now I have both
a solution and a probable cause. wow. Im happy.
Now which module changed that silly value... and...
is there a listing of all silly values that I can learn
from? Like newline, field seperator, $^W, etc?
------------------------------
Date: Wed, 17 May 2000 13:15:13 GMT
From: "jake" <jakemsr@earthlink.net>
Subject: Re: Perl and binary files
Message-Id: <BXwU4.3821$7V2.161285@newsread2.prod.itd.earthlink.net>
From: "Larry Rosler" <lr@hpl.hp.com>
> It is silly to use 'line-at-a-time' I/O on a file that has no 'lines'.
>
Bald assertions don't cut it. This is supposed to be 'science', not
religion.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 17 May 2000 13:15:14 GMT
From: "jake" <jakemsr@earthlink.net>
Subject: Re: Perl and binary files
Message-Id: <CXwU4.3822$7V2.161285@newsread2.prod.itd.earthlink.net>
From: "Larry Rosler" <lr@hpl.hp.com>
> It is silly to use 'line-at-a-time' I/O on a file that has no 'lines'.
>
Bald assertions don't cut it. This is supposed to be 'science', not
religion.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
Sorry to use your words out of context, but I found it fitting.
Jake
------------------------------
Date: Wed, 17 May 2000 07:15:43 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Perl and binary files
Message-Id: <3922A98F.38F3C387@vpservices.com>
jake wrote:
>
> From: "Larry Rosler" <lr@hpl.hp.com>
>
> > It is silly to use 'line-at-a-time' I/O on a file that has no 'lines'.
> >
>
> Bald assertions don't cut it. This is supposed to be 'science', not
> religion.
Say what??? Larry supplied both the alternate method of reading and the
reason for using it. If someone said "it is silly to use rules of
spelling on a file that contains only numbers" would that also be a bald
assertion requiring further explanation?
--
Jeff
------------------------------
Date: Wed, 17 May 2000 09:07:34 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Protecting Source Code?
Message-Id: <slrn8i56cm.25i.tadmc@magna.metronet.com>
On Wed, 17 May 2000 02:16:30 GMT, JB Goss <jgoss@goss-com.com> wrote:
>
>"James" <spectralmedia@home.com> wrote in message
>news:24hU4.66606$fF5.2310884@news1.rdc1.il.home.com...
>> Anyone know any good techniques for protecting your perl code?
>
>The new version has a Perl compiler... that does perty good for protection.
No it doesn't.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 17 May 2000 14:05:55 GMT
From: newsposter@cthulhu.demon.nl
Subject: Re: Protecting Source Code?
Message-Id: <8fu903$7tb$1@internal-news.uu.net>
Larry Rosler <lr@hpl.hp.com> wrote:
> In article <slrn8i39ml.k11.abigail@ucan.foad.org> on 16 May 2000
> 19:51:49 GMT, Abigail <abigail@foad.org> says...
>> On Tue, 16 May 2000 19:11:58 GMT, James <spectralmedia@home.com> wrote:
>> ++ Anyone know any good techniques for protecting your perl code?
>>
>> $ chmod 000 program.pl
> No, no, no. The permissions need to be 200. I need to write the damned
> thing, don't I?
The biggest danger to source code is its maintainer modifying it. So
the best protection is giving no write permission :)
Erik
------------------------------
Date: Wed, 17 May 2000 07:47:34 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Protecting Source Code?
Message-Id: <Pine.GSO.4.10.10005170746340.25459-100000@user2.teleport.com>
On 17 May 2000 newsposter@cthulhu.demon.nl wrote:
> The biggest danger to source code is its maintainer modifying it. So
> the best protection is giving no write permission :)
That's not the best; taking a sledgehammer to the hardware works better.
Applying the sledgehammer to the maintainer is left as an exercise for the
reader. :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 17 May 2000 15:47:47 +0200
From: "Leon" <l.idema@softhome.net>
Subject: txt file download question
Message-Id: <8fu7rr$pq1$1@thor.wirehub.nl>
Hi
When there is a link on a page to a file containing only text the browser
will display the text. But is there a possibility with Perl/CGI to make a
script wich let you DOWNLOAD that txt file instead of displaying it in a
browser? Without clicking on the left mouse and save as...
I hope you van help me,
Leon
------------------------------
Date: 17 May 2000 13:50:00 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: txt file download question
Message-Id: <slrn8i58s8.fja.sholden@pgrad.cs.usyd.edu.au>
On Wed, 17 May 2000 15:47:47 +0200, Leon <l.idema@softhome.net> wrote:
>Hi
>
>When there is a link on a page to a file containing only text the browser
>will display the text. But is there a possibility with Perl/CGI to make a
>script wich let you DOWNLOAD that txt file instead of displaying it in a
>browser? Without clicking on the left mouse and save as...
No.
And that has nothing to do with perl. Ask in a CGI group, but check their
FAQ first, if you don't believe my answer.
--
Sam
Just don't create a file called -rf. :-)
--Larry Wall
------------------------------
Date: Wed, 17 May 2000 07:42:56 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Unexpected behavior with redirected stdio and duped handles
Message-Id: <Pine.GSO.4.10.10005170740470.25459-100000@user2.teleport.com>
On 16 May 2000, Andrew Perrin - Demography wrote:
> - getlogin returns undef.
Well, it's doing this for me in any case, so I can't reproduce your
problem. :-)
But the manpage for getlogin(3C) on this system says:
If getlogin() is called within a process that is not
attached to a terminal, it returns a null pointer. The cor-
rect procedure for determining the login name is to call
cuserid(3S), or to call getlogin() and if it fails to call
getpwuid(3C).
Does your system's page say something similar? Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 17 May 2000 08:21:53 -0500
From: Russ Jones <russ_jones@rac.ray.com>
To: "news.btx.dtag.de" <neumann@m-line-bremen.de>
Subject: Re: upload to server
Message-Id: <39229CF1.AC68A05C@rac.ray.com>
"news.btx.dtag.de" wrote:
>
> I need help. I want to upload binary files to my www-server.
> I wrote a Script, but it isn't able to open the local file. What is wrong
> or what have I forgotten :
>
> open (DATA, "<$file") || die &sorry ("Datei konnte nicht zum lesen geöffnet werden"); # Unix coulnd't open this file, why ?????
... || die "Couldn't open this file for this reason: $!";
the "$!" will return the reason the file wouldn't open.
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
When cryptography is outlawed, only outlaws will
A2bgg c4dc8 aji0i knS4E 7eFj8 22Rl1
ZdGg3 gu8i6 lu12N s6NoG gn3g3 q835n
------------------------------
Date: Wed, 17 May 2000 07:32:20 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Using OCX object
Message-Id: <Pine.GSO.4.10.10005170731130.25459-100000@user2.teleport.com>
On Tue, 16 May 2000, MagicDRD wrote:
> Is there a special module to use that will allow me to use the OCX
> object
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! :-)
http://search.cpan.org/
http://www.cpan.org/
> or is there some method for creating my own .pm file that references
> the OCX???
Have you seen h2xs? Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 16 May 2000 18:02:40 +0200
From: Thomas Schmickl <schmickl@magnet.at>
Subject: Re: Way the ^&*$^%$^% off topic [Was: circa 1935 - 1940]
Message-Id: <39217120.2825369A@magnet.at>
Ilya Zakharevich wrote:
> And dropping a bomb on Moscow in '46 might have been a dangerous
> exercise, since Russian nuclear program would be in a full swing... ;-)
Do you sometimes think about the stuff you are writing.
Dropping a bomb is NEVER an "exercise". Never heard about
words like "murder" ?
You guys/girls are really sitting to much in front of your screens.
Ciao, thomas.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 3075
**************************************