[15678] in Perl-Users-Digest
Perl-Users Digest, Issue: 3091 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 18 18:05:49 2000
Date: Thu, 18 May 2000 15:05:19 -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: <958687518-v9-i3091@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 18 May 2000 Volume: 9 Number: 3091
Today's topics:
Re: "Breakthrough" Perl compiler? <glauber.ribeiroNOglSPAM@experian.com.invalid>
Re: "Breakthrough" Perl compiler? <Allan@due.net>
Re: "Breakthrough" Perl compiler? <charles.henry@engineer2k.com>
Re: "If" Not Being Evaluated - Vars Are Being Subsitute (Bart Lateur)
Re: $0 doesn't give full path (Abigail)
Re: [ CGI ] Can you know how long someone stayed connec (brian d foy)
Re: [ CGI ] Can you know how long someone stayed connec (Bart Lateur)
Re: [ CGI ] Can you know how long someone stayed connec <charles.henry@engineer2k.com>
[OT] Re: Accurate IP return? <GBloke@actiongames.co.uk>
Re: Accurate IP return? <GBloke@actiongames.co.uk>
Re: Accurate IP return? <GBloke@actiongames.co.uk>
Array Question (Arthur Merar)
Re: Assign file handle to scalar? <aqumsieh@hyperchip.com>
Re: Assign file handle to scalar? <mc@backwoods.org>
Re: CGI programmer needed for custom script (David H. Adler)
Re: Delay in Perl (Eric Dew)
fooling a process' requests for input <randyb2@uswest.net>
Re: fooling a process' requests for input <phil@BuxTech.Com>
Formmail without using @referers? <Tony@hypertony.co.ukNOSPAM>
Re: Formmail without using @referers? <rootbeer@redcat.com>
Giving a string the name of a string <ppi@searchy.net>
Re: Giving a string the name of a string <andrew.mcguire@walgreens.com>
Re: Giving a string the name of a string <charles.henry@engineer2k.com>
glueing a scalar onto a variable <danielxx@bart.nl>
HELP: how to compile (when necessary) a module download (Eric Liao)
Re: how to call PerlIS.dll in my own win32 programs <jhelman@wsb.com>
Re: How to execute "cat *.c" ??? (Gary E. Ansok)
Re: How to leave socket open... <uri@sysarch.com>
Let's try again: Makefile.PL problems <schaefer@zanshin.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 18 May 2000 11:26:58 -0700
From: glauber <glauber.ribeiroNOglSPAM@experian.com.invalid>
Subject: Re: "Breakthrough" Perl compiler?
Message-Id: <07b55f7e.072563d7@usw-ex0104-026.remarq.com>
It's the usual hype and trying to solve a problem that doesn't
exist. If you want to protect your code, you should rely on a
contract, not on your compiler -- anything can be decompiled,
and languages like Perl and Java can be decompiled in a very
readable way.
As for speedups, i greatly doubt it.
Plus, you'll be using a non-standard product, which will
probably have bugs which are different from the ones in the
standard Perl compiler/interpreter. :-)
For a better answer, type
perldoc -q hide
in the command line of a system with a full Perl 5 install.
glauber
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Thu, 18 May 2000 16:35:34 -0400
From: "Allan M. Due" <Allan@due.net>
Subject: Re: "Breakthrough" Perl compiler?
Message-Id: <8g1k7k$hm4$1@slb7.atl.mindspring.net>
Mur <jboesNOjbSPAM@qtm.net.invalid> wrote in message
news:3a4d6d29.f1275a5e@usw-ex0101-006.remarq.com...
: No, I'm not a shill for the company. Just stumbled upon this
: link:
: http://biz.yahoo.com/prnews/000503/wa_cyberwi_1.html
: and would like to know what if any experience the audience here
: has with this product.
$995!!!!
I almost spit coffee all over my keyboard. Have they no shame at all.
AmD
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--random quote --
"When you come to a fork in the road, take it!"
- Yogi Berra
------------------------------
Date: Thu, 18 May 2000 23:47:40 +0200
From: "Charles Henry" <charles.henry@engineer2k.com>
Subject: Re: "Breakthrough" Perl compiler?
Message-Id: <8g1on0$2e3i$1@news4.isdnet.net>
> It's the usual hype and trying to solve a problem that doesn't
> exist. If you want to protect your code, you should rely on a
> contract, not on your compiler -- anything can be decompiled,
> and languages like Perl and Java can be decompiled in a very
> readable way.
>
> As for speedups, i greatly doubt it.
>
> Plus, you'll be using a non-standard product, which will
> probably have bugs which are different from the ones in the
> standard Perl compiler/interpreter. :-)
Great but you seem to forget the *ONE* interesting reason to compile Perl
script : one doesn't have to have Perl installed in order to run your
program!
It is often so much easier to just give a compiled program that you give
your script and require your friend to install Perl on his system. True
isn't it?
------------------------------
Date: Thu, 18 May 2000 21:22:03 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: "If" Not Being Evaluated - Vars Are Being Subsituted?
Message-Id: <39265e8b.50054745@news.skynet.be>
NoSpam wrote:
>if ($number eq "3") {
> <IMG SRC="test.jpg" BORDER=0 ALT="Test">
> }
Do you honestly believe that this is valid Perl?
>produces when the script is run and displayed in a browser...
>
>if 1 eq "3") { image }
>
>(i.e. if is being treated as text and not Perl statement)
And that's the least of your problems...
Perl ne PHP.
--
Bart.
------------------------------
Date: 18 May 2000 20:07:40 GMT
From: abigail@foad.org (Abigail)
Subject: Re: $0 doesn't give full path
Message-Id: <slrn8i8jcb.lb4.abigail@ucan.foad.org>
On 18 May 2000 12:17:34 GMT,
Villy Kruse <vek@pharmnl.ohout.pharmapartners.nl> wrote:
++
++ Check perldoc -f exec to see how easy it is to put bogus values in
++ the called perl program's $0 varaible.
++
++ =item exec LIST
++
++ [snip ...]
++ If you don't really want to execute the first argument, but want to lie
++ to the program you are executing about its own name, you can specify
++ the program you actually want to run as an "indirect object" (without a
++ comma) in front of the LIST. (This always forces interpretation of the
++ LIST as a multivalued list, even if there is only a single scalar in
++ the list.) Example:
++
++ $shell = '/bin/csh';
++ exec $shell '-sh'; # pretend it's a login shell
++
++ or, more directly,
++
++ exec {'/bin/csh'} '-sh'; # pretend it's a login shell
++
++ When the arguments get executed via the system shell, results will
++ be subject to its quirks and capabilities. See L<perlop/"`STRING`">
++ for details.
Interesting theory, but it doesn't quite work that way:
$ cat /tmp/foo.pl
#!/opt/perl/bin/perl -w
print $0, "\n";
print $^X, "\n";
__END__
$ cat /tmp/bar.pl
#!/opt/perl/bin/perl -w
exec {'/tmp/foo.pl'} "barny";
__END__
$ /tmp/bar.pl
/tmp/foo.pl
/opt/perl/bin/perl
$
It prints /tmp/foo.pl and /opt/perl/bin/perl, but _not_ barny.
I guess that's a bug somewhere.
Abigail
------------------------------
Date: Thu, 18 May 2000 15:43:21 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: [ CGI ] Can you know how long someone stayed connected?
Message-Id: <brian-1805001543260001@47.atlanta-21-22rs.ga.dial-access.att.net>
In article <8g10an$gcg$1@reader1.fr.uu.net>, "Charles Henry" <charles.henry@engineer2k.com> wrote:
>I need a Perl module that allows me to know how much long someone has
>remained connected to my server.
you have to mess with the low level networking stuff, but then, you
probably want to know how long they look at your web site rather
than how long the socket stays open.
--
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ
<URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Thu, 18 May 2000 21:42:57 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: [ CGI ] Can you know how long someone stayed connected?
Message-Id: <39286211.50957218@news.skynet.be>
Charles Henry wrote:
>I need a Perl module that allows me to know how much long someone has
>remained connected to my server.
Someone comes to your site, and download one pretty large HTML page. He
then spends 10 minutes reading it. Then he closes the browser. How long
has he been "connected"? Was it the time getting the file? Was it the
time reading it? How could you know? He might just as well close his
internet connection, before starting to read.
If your pages are small, you could count on people spending not a lot of
time on each of numorous pages. Then Jeff Helman's suggestion sound
applicable:
>The closest you can come is knowing the time of their
>last request.
--
Bart.
------------------------------
Date: Thu, 18 May 2000 23:51:32 +0200
From: "Charles Henry" <charles.henry@engineer2k.com>
Subject: Re: [ CGI ] Can you know how long someone stayed connected?
Message-Id: <8g1ou7$1da$1@news3.isdnet.net>
> rather than how long the socket stays open.
Sorry Brian but I am not sure to understand (newbie here).
Could you explain me what you mean or, possibly, redirect me to a newsgroup
or Website where I could learn more about those so-called sockets?
Thanks for your time.
--
Makau
------------------------------
Date: Wed, 17 May 2000 13:46:05 +0100
From: "[TNN]G.Bloke" <GBloke@actiongames.co.uk>
Subject: [OT] Re: Accurate IP return?
Message-Id: <8fu4bc$r0h$1@neptunium.btinternet.com>
<Cut for reasons of band-width :)>
>
> Unfortunately what you are trying to do is nearly impossible (Perl issue
> or not).
Thanks but as I said in my reply....forget my reasons for wanting the
answer.
I was aware of the many problems that IP address as ID have... I myself sit
behind a firewall on a connection shared by 3 different computers on a
dynamic IP but IP identification would still have suited the situation I was
trying to remedy. The script would be used by a unique and small group and
the voting is limited to a two hour period. It was really only offered as a
token gesture to prevent friendly cheating amongst a group of colleagues.
If you don't give enough information people ask WHY you wanted the
answer.....if you give them the information they tell you to RETHINK your
approach. One day usenet users will just answer the question. (hopefully)
:o)
--
GBloke
------------------------------
Date: Wed, 17 May 2000 13:37:06 +0100
From: "[TNN]G.Bloke" <GBloke@actiongames.co.uk>
Subject: Re: Accurate IP return?
Message-Id: <8fu3pr$q2n$1@neptunium.btinternet.com>
<SNIPPY SNIP SNIP>
> Here's a link with more information:
>
> http://www.stars.com/Authoring/CGI/Input/Env.html
>
> 2) This "lot" is quite friendly and helpful, provided you don't
> (a) ask a question that has nothing to do with Perl, or (b) ask
> a FAQ. There is one, and it's quite good. Check it out.
>
> http://www.cpan.org/doc/FAQs/
> http://www.perlfaq.com/
>
Thanks that was a little more helpful....
I did check all the FAQ's that I could find on the subject....and secondly
my question was really to do with the ENV variables.
Thanks again.... (just wish people weren't so quick to dismiss or flame
people without actually understanding what they were asking, I'm not against
flaming off-topic posts etc.)
--
GBloke
------------------------------
Date: Wed, 17 May 2000 13:52:38 +0100
From: "[TNN]G.Bloke" <GBloke@actiongames.co.uk>
Subject: Re: Accurate IP return?
Message-Id: <8fu4mv$3ql$1@plutonium.btinternet.com>
<CUT>
> I think I could have put that better.
>
> In the case of a cache, proxy, firewall, network address translating
> router or any of the other multitude of means by which the actual IP
> address of a host might be concealed from you the address that you get in
> $ENV{REMOTE_HOST} *is* the address of the host that requested the page
> as far as the HTTP server is concerned: that it might not be the IP of
> the machine on which the browser which ultimately initiated the request
> is running is immaterial as whatever goes on between that machine and
> the device that is talking to your server is their private business -
> for all you know it might not even have an IP address at all.
>
> /J\
Thanks....I was aware of the problems of obtaining the correct IP address
(see my other post in this thread). All I was asking is was there a way
using perl.....you have answered that question, thank-you.
I was also aware why $ENV{REMOTE_HOST} didn't work, I just wondered if there
was a better perl alternative to this.
--
GBloke
------------------------------
Date: Thu, 18 May 2000 22:13:02 GMT
From: amerar@unsu.com (Arthur Merar)
Subject: Array Question
Message-Id: <39246acd.89974194@news.iwc.net>
Hello,
I am been playing with multidimentional associative arrays. I am
getting the hang of it, but cannot figure out one thing: How the heck
do you add rows to the array? For example, if I have this array:
%pers_record=('Bogdan'=>{'Address'=>'C1605','Phone'=>'x7869','College'=>'BMC'})
Now, I want to add another row, with another persons name, how do I do
it? I cannot seem to find a way without destroying the original
element..........
Any ideas?
Arthur
amerar@ci.chi.il.us
------------------------------
Date: Thu, 18 May 2000 18:34:11 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Assign file handle to scalar?
Message-Id: <7azopnk8rg.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>
MC <mc@backwoods.org> writes:
> I am creating an object module to act as a custom interface to a file. the
> object would open the file when created and close the file when
> destroyed. How
> can the object keep track of the file handle in the interrim? Can i
> assign it to
> a scalar so that other methods can use it as long as the object (and
> file) are
> open?
>
> ie:
>
> open FILE "myfile.ext";
> $object->{handle} = FILE;
$object->{handle} = \*FILE;
But, you'd be much better using the IO::File module:
use IO::File;
my $fh = new IO::File "myfile.ext";
unless (defined $fh) {
die "Can't open 'myfile.ext': $!";
}
$object->{handle} = $fh;
For more info:
perldoc IO::File
--Ala
------------------------------
Date: Thu, 18 May 2000 14:57:56 -0400
From: MC <mc@backwoods.org>
Subject: Re: Assign file handle to scalar?
Message-Id: <39243D34.62C5490C@backwoods.org>
Ala Qumsieh wrote:
>
> MC <mc@backwoods.org> writes:
>
> > I am creating an object module to act as a custom interface to a file. the
> > object would open the file when created and close the file when
> > destroyed. How
> > can the object keep track of the file handle in the interrim? Can i
> > assign it to
> > a scalar so that other methods can use it as long as the object (and
> > file) are
> > open?
> >
> > ie:
> >
> > open FILE "myfile.ext";
> > $object->{handle} = FILE;
>
> $object->{handle} = \*FILE;
>
Exactly what I was after!!
>
> But, you'd be much better using the IO::File module:
>
After looking into this one I think youre right, not quite what I was after as
far as usage, but its actually better for functionality. Thanks!!!
> use IO::File;
>
> my $fh = new IO::File "myfile.ext";
>
> unless (defined $fh) {
> die "Can't open 'myfile.ext': $!";
> }
>
> $object->{handle} = $fh;
>
> For more info:
>
> perldoc IO::File
>
> --Ala
------------------------------
Date: 18 May 2000 21:34:07 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: CGI programmer needed for custom script
Message-Id: <slrn8i8oef.pd2.dha@panix6.panix.com>
On Thu, 18 May 2000 03:14:40 GMT, landson@writeme.com
<landson@writeme.com> wrote:
>I would like to hire a cgi programmer to create what should be a simple
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
If God didn't want us to eat animals, he wouldn't have made them out
of Meat. - Phillip, Goats, 20sep99
------------------------------
Date: 18 May 2000 22:01:44 GMT
From: edew@netcom.com (Eric Dew)
Subject: Re: Delay in Perl
Message-Id: <8g1p88$r3j$1@slb0.atl.mindspring.net>
In article <39238061@nntp.connection.com>,
Alex Shi <chpshi@connection.com> wrote:
>Hi all,
>
>How can I set a time delay or sleep (5 or 10 seconds) in Perl?
sleep(5); # (or sleep(10), if you want 10 seconds.)
EDEW
------------------------------
Date: Thu, 18 May 2000 14:52:07 -0500
From: "Randy Bey" <randyb2@uswest.net>
Subject: fooling a process' requests for input
Message-Id: <sSXU4.345$Bl.4980@news.uswest.net>
Greetings,
I have a shell script that wraps around a hoary old executable that was
written to accept input from a human being -- it asks questions and gets the
answers from fingers on a keyboard.
The wrapper script has a file full of important data and fools the old
executable like so:
while read TICKNUM
do
printf "Changing [%s]..." $TICKNUM
/sys01/ar/scripts/oldscript.sh << EOT > /dev/null 2>&1
`hostname`
helpdesk
$TICKNUM
1
EOT
done < DATAFILE
So I know to use system with perl to process the oldscript.sh but how do I
simulate the newlines between "answers" to oldscript.sh's questions?
So in perl the script starts to look like this:
open(INFO, $INFILE);
while ($TICKNUM = <INFO>);
{
print "Changing $TICKNUM...";
system $BINDIR/cleanRemSch.sh << EOT
`hostname`
helpdesk
$TICKNUM
1
EOT
}
except for the parts between the first EOT and the end EOT.
Any guidance would be appreciated.
randy
randyb2@uswest.net
------------------------------
Date: 18 May 2000 16:03:04 -0400
From: Phil Eschallier <phil@BuxTech.Com>
Subject: Re: fooling a process' requests for input
Message-Id: <863dnf7hjb.fsf@BuxTech.Com>
>>>>> "Randy" == Randy Bey <randyb2@uswest.net> writes:
> Greetings, I have a shell script that wraps around a hoary old
> executable that was written to accept input from a human being
> -- it asks questions and gets the answers from fingers on a
> keyboard.
> The wrapper script has a file full of important data and fools
> the old executable like so:
> while read TICKNUM do
> printf "Changing [%s]..." $TICKNUM
> /sys01/ar/scripts/oldscript.sh << EOT > /dev/null 2>&1
> `hostname` helpdesk $TICKNUM 1 EOT done < DATAFILE
> So I know to use system with perl to process the oldscript.sh
> but how do I simulate the newlines between "answers" to
> oldscript.sh's questions?
> So in perl the script starts to look like this:
> open(INFO, $INFILE); while ($TICKNUM = <INFO>); { print
> "Changing $TICKNUM...";
> system $BINDIR/cleanRemSch.sh << EOT `hostname` helpdesk
> $TICKNUM 1 EOT }
> except for the parts between the first EOT and the end EOT.
> Any guidance would be appreciated. randy
> randyb2@uswest.net
Randy;
You may want to look at the Expect.pm module. Or, as Expect.pm does
not appear to be actively maintained, you may want consider the
original (expect under TCL).
Cheers.
--
Phil Eschallier | Bux Technical Services | Systems, software,
inet phil@BuxTech.Com | 131 Wells Road | security and Inter-
tel 215 348 9721 | Doylestown, PA 18901 | networking for your
fax 215 230 8265 | http://www.BuxTech.Com | business!
KeyID D6E9B193
------------------------------
Date: Thu, 18 May 2000 20:57:20 +0100
From: "Tony Sutton" <Tony@hypertony.co.ukNOSPAM>
Subject: Formmail without using @referers?
Message-Id: <8g1i0h$do$1@sshuraac-i-1.production.compuserve.com>
I got Formmail v1.6 from http://www.worldwidemart.com/scripts and I am
trying to configure this file not to use @referers so my clients can use it
on their website from my website. I don't want to edit the @referers all the
time.
No matter what I try, even adding '#' before the @referers line, it still
won't work.
Anyone got any ideas how to get the Formmail to read the @referers line?
Thanks,
--
- Tony Sutton
- http://www.midtownmadness2.co.uk
- http://www.hypertony.co.uk/easymoney.htm - Make Easy Money!
-------------------------------------------------------------
Nice guys finish last, but we get to sleep in.
-------------------------------------------------------------
------------------------------
Date: Thu, 18 May 2000 14:46:26 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Formmail without using @referers?
Message-Id: <Pine.GSO.4.10.10005181427120.25459-100000@user2.teleport.com>
On Thu, 18 May 2000, Tony Sutton wrote:
> I got Formmail v1.6
You should know that Matt's scripts aren't held in high regard around
these parts. So saying that you've got FormMail is like saying that you've
gotten lunch from a dumpster. :-)
> I am trying to configure this file not to use @referers so my clients
> can use it on their website from my website. I don't want to edit the
> @referers all the time.
So, you'd like to become a spam gateway? I don't think that's what you
mean, but that's what you're asking for. (Of course, even without this
change, if it's the software that I think it is, people would be able to
use your machine as a spam gateway; this just makes it easier for them.)
But if that's what you want, just use this line of code to set @referers,
and I think you'll get what you deserve. :-) Remember, though, to
paraphrase Matt, "By using this code you agree to indemnify Tom Phoenix
and everyone else in the world from any liability that might arise from
its use." :-)
@referers = '';
Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 18 May 2000 21:52:35 +0200
From: Penpal International <ppi@searchy.net>
Subject: Giving a string the name of a string
Message-Id: <39244A03.FD0060FE@searchy.net>
I tought this question could be found I the faq's, but I couldn't find
any which even looks like it:
How can I give a string a name from the contents of an other string. I
want this:
$string = "1-16";
# what now?
print "$cat1-16"; # Content should be given at the point "what now?"
Thanks,
Frank de Bot
--
Penpal International
http://ppi.searchy.net/
ppi@searchy.net
------------------------------
Date: Thu, 18 May 2000 16:19:56 -0500
From: "Andrew N. McGuire" <andrew.mcguire@walgreens.com>
Subject: Re: Giving a string the name of a string
Message-Id: <39245E7C.E4F99924@walgreens.com>
Penpal International wrote:
>
> I tought this question could be found I the faq's, but I couldn't find
> any which even looks like it:
>
> How can I give a string a name from the contents of an other string. I
> want this:
>
> $string = "1-16";
> # what now?
> print "$cat1-16"; # Content should be given at the point "what now?"
I am afraid you have not made yourself entirely clear,
could you please be a little more verbose?
Regards,
anm
--
/*-------------------------------------------------------.
| Andrew N. McGuire |
| andrew.mcguire@walgreens.com |
`-------------------------------------------------------*/
------------------------------
Date: Thu, 18 May 2000 23:42:52 +0200
From: "Charles Henry" <charles.henry@engineer2k.com>
Subject: Re: Giving a string the name of a string
Message-Id: <8g1oe0$gdt$1@news6.isdnet.net>
> How can I give a string a name from the contents of an other string. I
> want this:
>
> $string = "1-16";
> # what now?
> print "$cat1-16"; # Content should be given at the point "what now?"
Hi !
I wish I helped you effectively unfortunately I couldn't understand what you
actually want to do ...
Hope to hear from you soon ...
------------------------------
Date: Thu, 18 May 2000 21:54:29 GMT
From: "Daniel van den Oord" <danielxx@bart.nl>
Subject: glueing a scalar onto a variable
Message-Id: <pEZU4.2168$Kk2.27886@Typhoon.bART.nl>
I want to glue a number I get from a outside variable to another variable..
like I have the variable $number and I wanna glue 12 onto it making it
$number12
this is supposed to be an easy way for a huge list of selections
to make the right $number<xx> = "selected";
Daniel van den Oord ( Daniel304 RTCL )
------------------------------------------------------------------
It's nice to be important, but it's more important to be nice
See there be good bye bye
------------------------------------------------------------------
Daniel304rt ResearchTriangle Community Leader
http://www.geocities.com/ResearchTriangle/Forum/5577
------------------------------
Date: 18 May 2000 16:52:04 -0500
From: ekliao@mediaone.net (Eric Liao)
Subject: HELP: how to compile (when necessary) a module downloaded from CPAN
Message-Id: <3924650c.23742339@news1.newscene.com>
I need help on how to compile a CPAN module and put it under the right
place in local machine's (NT) win32 perl installation. Sorry if this
is a newbie question that's beaten to death or covered somewhere. Pls
point me to any such FAQ. Any info is appreciated. TIA!
------------------------------
Date: Thu, 18 May 2000 19:29:29 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: how to call PerlIS.dll in my own win32 programs
Message-Id: <392444B7.3332D3D1@wsb.com>
Is your GUI program written in C++? If so, linking in a full perl
interpreter is fairly easy. Type:
perldoc perlxstut
at your command prompt and read from there. There is also a great
section on this in the Panther book (Advanced Perl Programming by Sriram
Srinivasan from O'Reilly).
If your GUI is something else (Power Builder, VB, etc.) then that's a
different story. You're on your own there.
Hope this helps.
JH
----------------------------------------------------------------
Jeff Helman Product Manager -- Internet Services
jhelman@wsb.com CCH Washington Service Bureau
----------------------------------------------------------------
99 little bugs in the code, 99 bugs in the code.
Fix one bug, compile again, 100 little bugs in the code.
100 little bugs in the code, 100 bugs in the code.
Fix one bug, compile again, 101 little bugs in the code...
----------------------------------------------------------------
fchen0000 wrote:
>
> I have been asking for this question for years, but seems still no clue.
>
> I have a own win32 GUI program that like to use Perl as an assistant.
> system("perl.exe my.pl");
> would work, but it spawns a DOS prompt each time. More over,
> sometimes the single command prompt gives me illegal instruction.
>
> I know PerlIS.dll is an ISAPI extention. What I want is, though, an
> IIS server like thing to use PerlIS.dll -- not necessary to be
> "internet"
> related.
>
> Any1 actually knows the answer or want to help tackling this problem?
> Or, it is some kind of secret that does not belong to public domain?
>
> Best regards!
--
------------------------------
Date: 18 May 2000 20:27:53 GMT
From: ansok@alumni.caltech.edu (Gary E. Ansok)
Subject: Re: How to execute "cat *.c" ???
Message-Id: <8g1jo9$fv6@gap.cco.caltech.edu>
In article <8g0nhn$310c@edrn.newsguy.com>,
Petri Oksanen <Petri_member@newsguy.com> wrote:
>In article <8fgm86$gui$1@nnrp1.deja.com>, ovarene@webmails.com says...
>
>>I'd like to make a system call with an asterix wild card (*), like for
>>exemple: cat *.c.
>
>>I tried things based on system();
>>>@sys_args=("cat","*.c");
>>>system(@sys_args);
>
>>but always get the following error message:
>>>cat: Cannot open *.c: No such file or directory
>
>You can put your wildcard pattern directly into <> like this: while(<*.c>)
>Combine that with an inner loop to do your stuff with each file and I guess you
>have what you asked for.
>
>This solves your example:
>while(<*.c>) { # Get each filename matching the pattern.
> open C, $_ or die "Cannot open $_: $!\n";
> while(<C>) { # Get each line in the current file.
> print;
> }
>}
Here's an easier way to do the same thing (as long as some .c exists):
{ local @ARGV = <*.c>;
print while (<>);
}
Perl will take care of the opening, closing, and error reporting for you.
I've used this trick several times when I just want to read from a bunch
of files as if they were cat'd together. You do need to watch out for the
case where @ARGV can end up empty unless you want the script reading from
STDIN. If you're really lazy, you could use this for a single file.
Of course, this hack is probably not suitable for the OP's problem, where
"cat" was only an example.
--
Gary Ansok
------------------------------
Date: Thu, 18 May 2000 20:01:55 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: How to leave socket open...
Message-Id: <x7d7mjhbkd.fsf@home.sysarch.com>
>>>>> "z" == zc <tomp@sci.fi> writes:
z> For listening at time to time with while loop?
z> this while loop must no wait for connection, just check is there waiting
z> data.
use IO::Select. it can call a sub when the listen socket is ready to
accept a connection. it is a common way to design a server.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Thu, 18 May 2000 11:54:40 -0700
From: Bart Schaefer <schaefer@zanshin.com>
Subject: Let's try again: Makefile.PL problems
Message-Id: <Pine.LNX.4.20.0005181143390.19163-100000@aztec.zanshin.com>
I posted this on comp.perl.modules and didn't get any response. Maybe my
newshost just didn't propagate it.
I'm trying to write a Makefile.PL for a package that consists of two
parts: (1) a C library that uses a perl interpreter through the perlcall
API; (2) a .pm module that supplies helper functions for the callers of
that library. E.g., a typical usage would be to build up a C string that
contains perl code, including calls to the functions in the .pm module,
and then pass that string to the library, which runs it through perlcall.
I actually have all that stuff working (mostly). What I'm having trouble
with is creating a Makefile.PL such that "make install" copies both sets
of files into the right places. Right now I'm installing by hand.
Here's what I've got so far:
--------------------------------------------------------------------------
use ExtUtils::MakeMaker;
use ExtUtils::Embed;
xsinit('perlxsi.c',1);
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'PHPerl',
'VERSION_FROM' => 'PHPerl.pm', # finds $VERSION
'CCFLAGS' => '',
'OPTIMIZE' => '', # -g and -O options go here
'DEFINE' => '', # -Dxxx options go here
'INC' => '-I/var/src/php/libzend -I/var/src/php/Zend \
-I/var/src/php -I/var/src/php/dl', # -Ixxx options go here
'LIBS' => '', # -Lxxx -lyyy options go here
'OBJECT' => '$(O_FILES)',
);
--------------------------------------------------------------------------
The file PHPerl.pm is in the same directory as Makefile.PL. The C library
is in phperl.c, also in the same directory.
The first problem is that when "make" builds the tree under blib/, it
wants to install in PHPerl/PHPerl.pm, which means one needs:
use PHPerl::PHPerl;
when the intent is to need only "use PHPerl;".
The second problem is that, although $(O_FILES) is automatically generated
from the collection of .c files and causes all the right things to be
compiled, I haven't figured out how to cause Makefile.PL to emit the extra
code to cause PHPerl.so to be copied into e.g. /usr/local/lib/ during
"make install", instead of landing under /usr/lib/perl5/site_perl/....
Assistance appreciated. "perl -v" reports:
This is perl, version 5.004_05 built for i386-linux
(with 1 registered patch, see perl -V for more detail)
For more details and access to all the code involved, visit the PHPerl
project on SourceForge: http://phperl.sourceforge.net/
------------------------------
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 3091
**************************************