[11077] in Perl-Users-Digest
Perl-Users Digest, Issue: 4677 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 18 05:04:50 1999
Date: Mon, 18 Jan 99 02:00:16 -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 Mon, 18 Jan 1999 Volume: 8 Number: 4677
Today's topics:
Re: A plea for less goofy signature files! (John Moreno)
Correction to previous free CGI service nortinor@my-dejanews.com
Correction: Free Perl enabled CGI Webhosting Service nortinor@my-dejanews.com
foreach dilemma <off-duty@entheosengineering.com>
Re: foreach dilemma <ebohlman@netcom.com>
How does this work? <kwoody@citytel.net>
How to DEBUG perl inside other program (root)
Re: How to DEBUG perl inside other program (Ilya Zakharevich)
Re: Looking for CGI modules dave@mag-sol.com
Re: Looking for free Web Server with CGI dave@mag-sol.com
Re: Need help deciphering code (Tad McClellan)
Re: Perl Criticism <uri@home.sysarch.com>
Re: perl Help <damian@infoxchange.net.au>
Re: perl Help ptimmins@netserv.unmc.edu
Re: perl Help (Sam Holden)
Re: perl Help dave@mag-sol.com
Perl, NT4, SSLeay, Net::SSLeay -- How to install SSLeay cywenga@hotmail.com
Re: Problems with perlcc -- Fix <qin@laya.com_removethis>
Re: Problems with perlcc <qin@laya.com_removethis>
protecting scripts (Eric Smith)
Re: protecting scripts (Sam Holden)
Re: Sorting the values from a form <off-duty@entheosengineering.com>
Re: Sorting the values from a form <uri@home.sysarch.com>
Re: Syntax help wanted: "use strict" and sort $a and $ (William Herrera)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 18 Jan 1999 02:13:19 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: A plea for less goofy signature files!
Message-Id: <1dlt20p.2f9dqx16f42mbN@roxboro0-056.dyn.interpath.net>
Tramm Hudson <hudson@swcp.com> wrote:
> Russ Allbery <rra@stanford.edu> wrote:
> [Snip lots]
> >... As a result, the signature tear line is likely to get standardized
> >in the next version of the Usenet RFC. The primary motivation for doing
> >so is to help sites like DejaNews with their indexing.
>
> If DejaNews is so concerned about sig-dashes, they really should
> have their posting software configured to produce them for their
> ads. I wrote to bugs@dejanews.com pointing out that they are
> emiting posts that lack the appropriate divider. They wrote back
> with a non-specific "We're looking into that" message.
If they start doing so, I hope they check to see if it's already got a
proper sigdash (last I checked, Nov?, they allowed the user to enter a
proper sigdash when typing in their own sig).
--
John Moreno
------------------------------
Date: Mon, 18 Jan 1999 06:35:12 GMT
From: nortinor@my-dejanews.com
Subject: Correction to previous free CGI service
Message-Id: <77ukmv$vpv$1@nnrp1.dejanews.com>
This is a message regarding an earlier announcement concerning the free CGI
accounts available from Graffiti. Owing to registration difficulties at
InterNIC, one of the URLs provided in the earlier post did not work. We wish
to correct this mistake now.
http://www.CGIrealms.com is an address that will apparently not be fully
registered for a while, however the following address is perfectly functional:
http://www.CGIrealm.com
We apologize for any inconvenience.
Free CGI accounts for anyone and everyone are now available from Graffiti.net.
For information on how to obtain an account at no cost and in about three
minutes, take a look at http://www.CGIrealm.com or http://www.graffiti.net (in
the web hosting section). Please note that CGI accounts are distinct from Web
Hosting. Do not apply for web hosting if what you are looking for is a CGI
account, because you arent going to get it that way.
CGI Realm is a service provided by Graffiti.net that offers one-megabyte CGI
accounts at no cost whatsoever. You may upload any CGI script you wish, and
use these CGI accounts in conjunction with web hosting (provided by
Graffiti.net OR by an outside agency). There are no costs involved, no spam
(now or later), and you dont even need commitment (except pasting a
hyperlink on your CGI page).
Graffiti.net is powered by Outblaze (www.outblaze.com).
CGIrealm.com and Graffiti.net Management
http://www.CGIrealm.com
http://www.graffiti.net
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 06:39:27 GMT
From: nortinor@my-dejanews.com
Subject: Correction: Free Perl enabled CGI Webhosting Service
Message-Id: <77ukuv$vs4$1@nnrp1.dejanews.com>
This is a message regarding an earlier announcement concerning the free CGI
accounts available from Graffiti. Owing to registration difficulties at
InterNIC, one of the URLs provided in the earlier post did not work. We wish
to correct this mistake now.
www.CGIrealms.com is an address that will not be fully registered for a while,
however the following address is perfectly functional:
http://www.CGIrealm.com
We apologize for any inconvenience.
Free CGI accounts for anyone and everyone are now available from Graffiti.net.
For information on how to obtain an account at no cost and in about three
minutes, take a look at http://www.CGIrealm.com or http://www.graffiti.net (in
the web hosting section). Please note that CGI accounts are distinct from Web
Hosting. Do not apply for web hosting if what you are looking for is a CGI
account, because you arent going to get it that way.
CGI Realm is a service provided by Graffiti.net that offers one-megabyte CGI
accounts at no cost whatsoever. You may upload any CGI script you wish, and
use these CGI accounts in conjunction with web hosting (provided by
Graffiti.net OR by an outside agency). There are no costs involved, no spam
(now or later), and you dont even need commitment (except pasting a
hyperlink on your CGI page).
Graffiti.net is powered by Outblaze (www.outblaze.com).
CGIrealm.com and Graffiti.net Management
http://www.CGIrealm.com
http://www.graffiti.net
In article <77rcmq$dj2$1@nnrp1.dejanews.com>,
info_graffiti@my-dejanews.com wrote:
> Free Perl enabled CGI accounts for anyone and everyone are now available from
> Graffiti.net. For information on how to obtain an account at no cost and in
> about three minutes, take a look at http://www.CGIrealms.com or
> http://www.graffiti.net (under web hosting, option CGI)
>
> CGI Realms, a service provided by Graffiti.net, offers Webhosting enabled CGI
> accounts at no cost whatsoever. Use these CGI accounts in conjunction with web
> hosting (provided by Graffiti.net OR by an outside agency). There are no costs
> involved, no spam (now or later), and you dont even need commitment (apart
> from being a law-abiding citizen).
>
> www.cgirealms.com
> www.graffiti.net
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 17 Jan 1999 16:51:27 -0600
From: Rich Grise <off-duty@entheosengineering.com>
Subject: foreach dilemma
Message-Id: <36A2696F.2FDC@entheosengineering.com>
When I have a foreach loop going through a file
one line at a a time, and match something that
breaks the loop, then does the next foreach on
the same list pick up where the last one left
off, or start from the top again? (I want to
capture the lines between a certain "From"
address and the ensuing "end of message" line
in an In.mbx file).
Thanks!
--
Rich Grise
off-duty@entheosengineering.com
(no need to screw around with the e-mail -
I have a delete button!)
------------------------------
Date: Mon, 18 Jan 1999 08:14:16 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: foreach dilemma
Message-Id: <ebohlmanF5qxJs.A7K@netcom.com>
Rich Grise <off-duty@entheosengineering.com> wrote:
: When I have a foreach loop going through a file
: one line at a a time, and match something that
: breaks the loop, then does the next foreach on
: the same list pick up where the last one left
: off, or start from the top again? (I want to
: capture the lines between a certain "From"
: address and the ensuing "end of message" line
: in an In.mbx file).
The next one will start at the beginning. You can't exit a loop and then
re-enter it.
It sounds like you want the range operator (see the perlop (man page |
HTML page | POD file for more info) for what you're doing.
------------------------------
Date: Mon, 18 Jan 1999 00:09:31 -0800
From: Keith Woodworth <kwoody@citytel.net>
Subject: How does this work?
Message-Id: <Pine.BSI.3.95.990118000336.12945B-100000@rosencrantz.citytel.net>
Ive been playing with some examples from Prgramming Perl and came across
the crypt() function.
I copied it in and tried to run it and get uncaught exception in user
code. But as root when I try it it works.
Code from book:
#!/usr/local/bin/perl5 -w
use diagnostics;
$pwd = (getpwuid ($<))[1];
$salt = substr $pwd, 0, 2;
system "stty -echo";
print "password: ";
chop($word = <STDIN>);
print "\n";
system "stty echo";
if (crypt($word, $salt) ne $pwd) {
die "Sorry...\n";
} else {
print "ok\n";
}
Now I'm assuming it has to do with the $< var. What does the [1] do after
it though? I guess I need a pointer on setuid and such.
I tried things like rwsr-sr-x and other combo's but it stil only works
when I su to root (and only root can read master.passwd). so any pointers
on how to make this work non-root?
thanks
------------------------------
Date: 18 Jan 1999 07:36:17 GMT
From: root@tbsky.unicap.com.tw (root)
Subject: How to DEBUG perl inside other program
Message-Id: <77uo9h$fp3$1@news.seed.net.tw>
i m trying to write perl script inside a CAD/CAM software.
and i got a debugging problem because the CAD/CAM software
catch the STANDARD-IN & OUT.
so if i add
#!/usr/bin/perl -d
to my script when it starts inside the CAD/CAM software it just hang there.
it is waiting for user to input debug command,but i can't input anything
because the CAD/CAM software catch the STAND-IN.
i think it's a kind of problem like debugging CGI programs ???
Any suggestion would be appreciated .....
Thans a lot.....
------------------------------
Date: 18 Jan 1999 08:59:29 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: How to DEBUG perl inside other program
Message-Id: <77ut5h$4f3$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to root
<root@tbsky.unicap.com.tw>],
who wrote in article <77uo9h$fp3$1@news.seed.net.tw>:
> i m trying to write perl script inside a CAD/CAM software.
> and i got a debugging problem because the CAD/CAM software
> catch the STANDARD-IN & OUT.
>
> so if i add
>
> #!/usr/bin/perl -d
>
> to my script when it starts inside the CAD/CAM software it just hang there.
> it is waiting for user to input debug command,but i can't input anything
> because the CAD/CAM software catch the STAND-IN.
Advice debugger to use an alternative TTY. It is probably the
simplest to do either from .perldbrc (if $ENV{HOME} inside your CAD is
writable), or from $ENV{PERLDB_OPTS} if you can set %ENV before
starting your CAD. See
perlpod perldebug
for details.
Ilya
------------------------------
Date: Mon, 18 Jan 1999 09:08:37 GMT
From: dave@mag-sol.com
Subject: Re: Looking for CGI modules
Message-Id: <77utmg$7q2$1@nnrp1.dejanews.com>
In article <77qiji$o8g$1@nnrp1.dejanews.com>,
spadesmcgee@my-dejanews.com wrote:
> Hi all,
>
> I'm writing some really simple CGI scripts, that return HTML and send emails.
> No biggie.
>
> I did all this 4-5 years ago or so, and haven't used Perl since. Since then it
> seems like a lot has changed, esp as far as available packages (I used Perl 4
> and have never really used modules or any of the Perl OOP stuff). I'm guessing
> there are modules available for what I want to do (it's only been done like a
> billion times), but where do I start?
CGI.pm is your best starting point. It is included in the standard Perl
distribution.
--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 09:07:16 GMT
From: dave@mag-sol.com
Subject: Re: Looking for free Web Server with CGI
Message-Id: <77utk0$7pq$1@nnrp1.dejanews.com>
In article <36A0CF1E.74D1E596@hamptons.com>,
Chris <chrisl@hamptons.com> wrote:
> Hi
>
> Are there any free Web servers for Win98 (even trial versions) that
> allow me to mess around with CGI & Perl? Last time I tried this (years
> ago), PWS was supposed to do it but it was broken (or I was broken, or
> something)
Get Apache from <http://www.apache.org>
--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 00:07:51 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Need help deciphering code
Message-Id: <n3ju77.gs4.ln@magna.metronet.com>
[ please limit your line lengths to 70-72 characters as is
Usenet custom
]
THE Groovy (thegroovy@aol.com) wrote:
: I was trying to patch some security holes in one of my scripts and someone
: suggested using the following code, however, I am not sure what does what (and
: he didn't explain very well). Thanks for any help!
: A little background on what I'm trying to do:
: Making a mailing list program, and trying to make sure that it is fairly secure
: before releasing it.
: Also, if you are good with perl programming with security,
: please contact me so I can ask you a couple more questions and to see if you
: find any other loopholes.
I think if you mentioned how much you are willing to pay you
will have better luck finding a security consultant.
: if ($line =~ m/[^\w\.\&\@]/) { #process unsafe characters }
Hmmm.
So I guess a line with a hyphen or a space in it is suspect?...
[ I would not take security advise from whoever wrote that
char class, as she/he doesn't even know what the regex
metachars are...
]
: # What this means is the match returns true if any characters NOT
: # in your character class exist.
Make a list of the characters matched by the character class
(if it was not negated with the ^):
a-z
A-Z
0-9
_ # underscore
.
&
@
If any character appears in $line that does not appear in your list,
then the 'if' clause will execute, else the 'else' clause will
execute.
: else { #check the format & other stuff
: if ($line =~ m/^[\w\.\&]+\@[\w\.]+$/) {
: #process a probably
: # OK e-mail address.
: }
: }
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 18 Jan 1999 03:56:41 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Perl Criticism
Message-Id: <x7ognxez7a.fsf@home.sysarch.com>
>>>>> "TM" == Tad McClellan <tadmc@metronet.com> writes:
TM> : > It must be that I am reaching celebrity
TM> : > status in this group
TM> Don't be getting all puffed up about celebrity status.
TM> Daffy Duck is a celebrity...
how dare you insult daffy by comparing him to bottommind.
no :-).
daffy is a true hero and icon. could you survive a shotgun blast and
just swivel your burnt beak around until it is the correct position
again? i doubt it.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 18 Jan 1999 17:08:47 +1100
From: "Damian" <damian@infoxchange.net.au>
Subject: Re: perl Help
Message-Id: <916639696.69520@atlas.onthe.net.au>
>I need to find a way to return a certain character of a string, counting
from
>the beginning
>ie: string = 'abcd', character 1 of string = 'a', 2='b', etc
>
substr EXPR
It's in the 'perlfunc' manpage.
$s = 'abcd';
print substr($s,2,1);
# returns 'c'
In substr, $s is the variable you want to split, the first number (2) is
the starting position of the characters you want to grab, the first
character in your string being '0'. And the second number (1) is how
many characters you want to grab.
------------------------------
Date: Mon, 18 Jan 1999 08:22:16 GMT
From: ptimmins@netserv.unmc.edu
Subject: Re: perl Help
Message-Id: <77uqvi$5lf$1@nnrp1.dejanews.com>
In article <77uhb5$t5j$1@nnrp1.dejanews.com>,
bigcheese@my-dejanews.com wrote:
> I need to find a way to return a certain character of a string, counting from
> the beginning
> ie: string = 'abcd', character 1 of string = 'a', 2='b', etc
$row = 0;
while (<DATA>) {
chomp;
$chr[$row]{string} = $_;
@tmp = split //;
for ($i=0; $i<@tmp; $i++) {
$chr[$row]{char}[$i] = $tmp[$i];
}
$row++;
}
for ($z=0; $z<@chr; $z++) { for ($y=0; $y<@{ $chr[$z]{char} }; $y++) {
print "char ".($y+1)." of string $chr[$z]{string} is $chr[$z]{char}[$y]\n";
} }
__DATA__
abcd
efgh
ijkl
Patrick Timmins
$monger{Omaha}[0]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 18 Jan 1999 09:11:21 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: perl Help
Message-Id: <slrn7a5ulp.hi2.sholden@pgrad.cs.usyd.edu.au>
On Mon, 18 Jan 1999 08:22:16 GMT, ptimmins@netserv.unmc.edu
<ptimmins@netserv.unmc.edu> wrote:
>In article <77uhb5$t5j$1@nnrp1.dejanews.com>,
> bigcheese@my-dejanews.com wrote:
>
>> I need to find a way to return a certain character of a string, counting from
>> the beginning
>> ie: string = 'abcd', character 1 of string = 'a', 2='b', etc
>
>$row = 0;
>while (<DATA>) {
> chomp;
> $chr[$row]{string} = $_;
> @tmp = split //;
> for ($i=0; $i<@tmp; $i++) {
> $chr[$row]{char}[$i] = $tmp[$i];
> }
Instead of all that why not use the more obvious :
$chr[$row]{char} = [split //];
> $row++;
>}
>
>for ($z=0; $z<@chr; $z++) { for ($y=0; $y<@{ $chr[$z]{char} }; $y++) {
>print "char ".($y+1)." of string $chr[$z]{string} is $chr[$z]{char}[$y]\n";
>} }
>
>__DATA__
>abcd
>efgh
>ijkl
The original poster basically asked how can I access a character in a string
given it's offset from the start of the string. In other words the C
way...
No mention of arrays of hashes or arrays was mentioned. If someone is
having difficulty extracting a character, don't you think they have
problems with the syntax '$chr[$row]{char}[$i] = $tmp[$i]' and not
completely understand what it is doing.
For the original poster my answer would be :
You can use substr to access a substring given an offset and length. If
you make the length 1 then you access a single character. So I could do
something like this :
$string = "This is a string";
print substr($string,3,1),"\n"; #this will print an 's'
print substr($string,0,1),"\n"; #this will print a 'T'
#You even get write access
substr($string,0,1,"t");
print $string,"\n"; #this will print "this is a string"
However accessing strings on a character by character basis is not often
done in perl. So there is probably a solution to your problem that plays
more to perl's strengths.
The last posters solution shows how 'split' can be used to break up a
string into a bunch of characters, which may be useful if you want to
access them a lot. Why all the reference crap was included I will never
know...
--
Sam
testing? What's that? If it compiles, it is good, if it boots up it is
perfect.
--Linus Torvalds
------------------------------
Date: Mon, 18 Jan 1999 09:19:08 GMT
From: dave@mag-sol.com
Subject: Re: perl Help
Message-Id: <77uua7$88q$1@nnrp1.dejanews.com>
In article <77uhb5$t5j$1@nnrp1.dejanews.com>,
bigcheese@my-dejanews.com wrote:
> I need to find a way to return a certain character of a string, counting from
> the beginning
> ie: string = 'abcd', character 1 of string = 'a', 2='b', etc
>
> Can anyone help me?
perldoc -f substr
--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 06:30:49 GMT
From: cywenga@hotmail.com
Subject: Perl, NT4, SSLeay, Net::SSLeay -- How to install SSLeay without compiling?
Message-Id: <36a2b119.472084@news.earthlink.net>
Hi all,
I'm trying to use Perl 5 (This is perl, version 5.004_02) and NT4
(SP4) to retrieve an SSL document on a server. The code I'm trying is
directly out of the SSLeay.pm documentation, with one minor change --
removal of a comma between "SSLeay" and "qw(...".
I've installed Net::SSLeay. I know that it uses SSLeay, but the
installation of SSLeay isn't easy, especially if you don't want to
compile your own.
I've placed the .lib and .dll files in the path, perl/bin, and the
directory of the script, with no success.
Strangely, the error message isn't found in the perldiag page of the
documentation, nor can I find it anywhere in SSLeay.pm
1) Has anyone successfully used Net::SSLeay on an NT?
2) How? Your help will be much appreciated.
Script:
-----------------------------------------------------------------------------------------------------
use Net::SSLeay qw(get_https post_https sslcat make_headers
make_form);
($page) = get_https('www.cryptsoft.com', 443, '/');
-----------------------------------------------------------------------------------------------------
It results in this error:
-----------------------------------------------------------------------------------------------------
D:\perlprogs\SSL>perl ssl.pl
Can't find loadable object for module Net::SSLeay in @INC
(D:\PERL\lib\site D:\PERL\lib c:\perl\lib c:\perl\lib\site
c:\perl\lib\site .) at ssl.pl line 1
BEGIN failed--compilation aborted at ssl.pl line 1.
-----------------------------------------------------------------------------------------------------
Eric Poulsen
tallguy999@hotmail.com
------------------------------
Date: Sun, 17 Jan 1999 22:05:41 -0800
From: Robert Chin <qin@laya.com_removethis>
Subject: Re: Problems with perlcc -- Fix
Message-Id: <36A2CF35.260E3AC3@laya.com_removethis>
Alright, I found the problem and fixed it about an hour after I sent the
last message. You said your problem is an "undefined symbol", while my
problem is an undefined reference to runops. Either way, this fix fixes
my problem, and it's probably worth a try anyway:
Add the following line to embed.h:
#define runops Perl_runops_standard
It seems some things were changed between 5.003 and 5.005 which make
some of the existing perlcc code incompatible.
Robert Chin
Bill Jackson wrote:
> I am running Perl 5.00502 on Solaris 2.5.1 using gcc-2.8.1.
>
> I am trying to create a binary executable of my perl programs using
> perlcc.
> (Don't ask me why, I had a reason but now I'm not sure why myself)
>
> Anyway, I'm getting an undefined symbol 'runops' when the program
> tries to link.
>
> Any ideas?
>
> Bill
------------------------------
Date: Sun, 17 Jan 1999 21:03:54 -0800
From: Robert Chin <qin@laya.com_removethis>
Subject: Re: Problems with perlcc
Message-Id: <36A2C0B9.5F963977@laya.com_removethis>
I'm getting this problem too! I'm running Perl 5.00502, and I've also
tried 5.00554 (the development release). I've been trying to figure out
where the problem lies for the past three days straight. I'm using gcc
(egcs 2.90.29) on Linux 2.0.36. I started encountering this problem
when I switched from my own code over the the LWP package (I've tried
several versions of that, all with the same error). So far the only
instance I can find of "runops" in any of the code is in
/usr/lib/perl5/5.00502/i486-linux-thread/CORE/proto.h (modify path
accordingly). What's the exact error message you get? It might help me
figure out a solution. I get:
/tmp/cca003831.o: In function `pp_main':
/tmp/cca003831.o(.text+0x4ef5): undefined reference to `runops'
Right now, all I can think of is that it either has something to do with
using modules, or that there's a line of code in the module perlcc
doesn't like. I've yet to further isolate the problem.
Robert Chin
Bill Jackson wrote:
> I am running Perl 5.00502 on Solaris 2.5.1 using gcc-2.8.1.
>
> I am trying to create a binary executable of my perl programs using
> perlcc.
> (Don't ask me why, I had a reason but now I'm not sure why myself)
>
> Anyway, I'm getting an undefined symbol 'runops' when the program
> tries to link.
>
> Any ideas?
>
> Bill
------------------------------
Date: 18 Jan 1999 07:19:56 GMT
From: eric@fruitcom.com (Eric Smith)
Subject: protecting scripts
Message-Id: <slrn7a5o4s.rt2.eric@eric.nafex.com>
Keywords: protection
Hello Perl
I would like to distribute some simple scripts but do not want
to give access to the code (an added bonus would be to have a
time expiry as well). SO basically I guess I want to distribute
a compiled binary of the script.
Would appreciate your suggestions.
TIA
Eric Smith
eric@fruitcom.com
------------------------------
Date: 18 Jan 1999 07:52:40 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: protecting scripts
Message-Id: <slrn7a5q28.gof.sholden@pgrad.cs.usyd.edu.au>
On 18 Jan 1999 07:19:56 GMT, Eric Smith <eric@fruitcom.com> wrote:
>Hello Perl
>
>I would like to distribute some simple scripts but do not want
>to give access to the code (an added bonus would be to have a
>time expiry as well). SO basically I guess I want to distribute
>a compiled binary of the script.
Use a license instead.
An obvious thing to do would be search the archives at dejanews and you
would discover that this is a religious question you may have been
better off not asking.
For a large number of options search the archives...
--
Sam
comments on data are usually much more helpful than on algorithms
--Rob Pike
------------------------------
Date: Sun, 17 Jan 1999 16:59:34 -0600
From: Rich Grise <off-duty@entheosengineering.com>
Subject: Re: Sorting the values from a form
Message-Id: <36A26B56.64EE@entheosengineering.com>
Eirik Johansen wrote:
>
> I use a foreach loop to print out the user inputs of a form into a mail,
> because I don't know the name of the components in the form (they're
> supposed to be optional). But is there a way to organize the foreach
> loop so it prints the values in the same order as they appear on the
> form.
>
> The loop looks like this
>
> > foreach $key (keys(%FORM)) {
> > print MAIL "$key: $FORM{$key}\n" unless $key =~ /recipient|subject/
> > }
> >
>
> Thanks for any helpful advice !
>
> Regards
> Newbie
The closest thing I can think of, and I'm a newbie at this
myself, would be:
foreach ($mykey, $myvalue) (@FORM) {
do whatever,
etc,
yadda yadda.
but that still wouldn't guarantee anything, since FORM is
a hash. You gotta go all the way back to the buffer that
your initial input statement reads, which still isn't
guaranteed to be in form order, because it's coming from
the browser. (Are there specs on that?)
Anyway, have fun experimenting!
--
Rich Grise
off-duty@entheosengineering.com
(no need to screw around with the e-mail -
I have a delete button!)
------------------------------
Date: 18 Jan 1999 04:09:11 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Sorting the values from a form
Message-Id: <x7lnj1eymg.fsf@home.sysarch.com>
>>>>> "RG" == Rich Grise <off-duty@entheosengineering.com> writes:
RG> Eirik Johansen wrote:
>>
>> I use a foreach loop to print out the user inputs of a form into a mail,
>> because I don't know the name of the components in the form (they're
>> supposed to be optional). But is there a way to organize the foreach
>> loop so it prints the values in the same order as they appear on the
>> form.
not if it is processed already by the cgi code (hopefully CGI,pm and not
cgi-lib or home brew). but the order in the form should not matter in
general. also CGI.pm will handle multiple values correctly.
RG> foreach ($mykey, $myvalue) (@FORM) {
RG> do whatever,
RG> etc,
RG> yadda yadda.
RG> but that still wouldn't guarantee anything, since FORM is
RG> a hash. You gotta go all the way back to the buffer that
we appreciate the help but try to post something that would work. you
state that FORM is a hash so why write @FORM? and the foreach pseude
perl code is nonsense. you might be thinking of the each function which
is typically used in a while loop like this:
while( ($key, $val) = each %FORM ) {
print "$key => $val\n" ;
}
this is much faster than looping over keys %FORM and doing a hash lookup
for each $key. but the keys method allows you sot sort them first. i
have done this instead which i like:
@form_vals = () ;
while( ($key, $val) = each %FORM ) {
push( @form_vals, "$key => $val\n" ) ;
}
print sort @form_vals ;
i actually have used that for the %ENV hash. for this you should check
for multiple valued fields and handle them accordingly.
hth,
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Mon, 18 Jan 1999 06:20:09 GMT
From: posting.account@lookout.com (William Herrera)
Subject: Re: Syntax help wanted: "use strict" and sort $a and $b parameters...
Message-Id: <36a2d257.102309830@news.rmi.net>
On Sun, 17 Jan 1999 15:19:15 GMT, Eric Bohlman <ebohlman@netcom.com>
wrote:
>
>Set PERL5OPT in your environment to "-MWild" (or append, if you already
>have something in PERL5OPT), and make sure you put Wild.pm below in
>your perl's "lib" directory:
>
># Wild.pm - emulate shell @ARGV expansion on shells that don't
>use File::DosGlob;
>@ARGV = map { my @g = File::DosGlob::glob($_) if /[*?]/; @g?@g:$_ } @ARGV;
>1;
>
>Unlike compiling the @ARGV expansion into the binary (which has
>compatibility and reliability problems too), this is a fully
>*optional* solution.
Thanks--this seems like the best solution for moving around between
builds.
--Bill
---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 4677
**************************************