[26099] in Perl-Users-Digest
Perl-Users Digest, Issue: 8298 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 1 18:05:37 2005
Date: Mon, 1 Aug 2005 15:05:04 -0700 (PDT)
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, 1 Aug 2005 Volume: 10 Number: 8298
Today's topics:
Re: Coding Conventions and Speech: No Punctuation, Rena <abigail@abigail.nl>
Re: desc $table in DBI Oracle xhoster@gmail.com
Re: dynamic execution of equations xhoster@gmail.com
Re: Old C dog. <usenet@vyznev.invalid>
Re: regex help <i.gave.up.my.privacy@gmail.com>
Re: sendmail Help Please <tadmc@augustmail.com>
Re: sendmail Help Please jane@rifill.com
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 01 Aug 2005 21:18:45 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Coding Conventions and Speech: No Punctuation, Renaming Operators etc...
Message-Id: <slrndet4dl.7fo.abigail@alexandra.abigail.nl>
Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi) wrote on MMMMCCCLIII
September MCMXCIII in <URL:news:dcl2un$sct$1@news.oulu.fi>:
>
> That's why, you guessed it, I don't let the screen reader prompt foreground
> color changes and try to generally disable syntax highlighting when-ever
> easily possible.
I am wondering, can your screen reader be tuned so it doesn't read text
where the foreground and the background colours are the same? In that case,
you can (mis)use syntax highlighting by giving the punctuation you don't
want to see the same fore- and background colours.
Abigail
--
($;,$_,$|,$\)=("\@\x7Fy~*kde~box*Zoxf*Bkiaox","X"x25,1,"\r");
s/./ /;{vec($_=>1+$"=>8)=ord($/^substr$;=>$"=int rand 24=>1);
print&&select$,,$,,$,,$|/($|+tr/X//c);redo if y/X//};sleep 1;
------------------------------
Date: 01 Aug 2005 15:46:37 GMT
From: xhoster@gmail.com
Subject: Re: desc $table in DBI Oracle
Message-Id: <20050801114637.177$AO@newsreader.com>
ngoc <ngoc@yahoo.com> wrote:
> Hi
> I use "my $header_sql = qq { desc $table };". It does not work.
> But "select column_name from all_tab_columns where table_name =
> \'$table\'" work.
> My problem is "desc $table" matching which "select * from $table"
> than
> select column_name ...........
> (I mean data and column name order matching).
> Thanks
I believe, but am not certain, that "desc" is not valid Oracle SQL syntax.
Rather, it is a command to the oracle tool SQLPLUS. So when you are using
SQLPLUS, it intercepts the desc command and processes it itself. Since
perl is connecting directly to Oracle, not via SQLPLUS, then the command
does not work from Perl.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 01 Aug 2005 15:27:03 GMT
From: xhoster@gmail.com
Subject: Re: dynamic execution of equations
Message-Id: <20050801112703.456$2b@newsreader.com>
"lapenta[" <"lapenta["@]ll.mit.edu> wrote:
> Hello,
>
> I am trying to map out a simple PERL program to optimize coefficents for
> a dynamic list of equations based on a set of rules.
What does dynamic mean in this context?
> I'm having trouble
> figuring out how to efficiently and dynamically load different
> equations.
Can these "equations" be some abstract mathematical constructs that don't
necessarily map directly into Perl expressions, or are they always
simply valid Perl expressions?
> Idealy separate files would each define the equation and
> rules, while the main tool would load 1...n equations at a time and run
> the optimization algorithm. As the equation will be executed many times
> during the optimization, execution speed is a factor. I was thinking
> dynamic modules would work nicely,
What is a dynamic module?
> but I can not figure out how to get
> them to work. I would like to avoid doing something like 'exec "perl
> $eqn"' as I imagine that would be much too slow for many equations.
exec is inherently run in perl, so you don't
exec "perl $eqn" ;
you just
exec "$eqn";
And for efficiency's sake, you can do:
my $subref = exec "sub {$eqn}";
and then efficiently invoke $subref->(@vars) to your hearts' content.
or
push @subref, exec "sub {...}";
and then invoke $subref[1]->(@vars);
>
> for example...
>
> file1.pl
> ----------------------------------------------
> #!/usr/bin/perl -w
>
> BEGIN{
> $g_module = $ARGV[0];
> }
This doesn't seem very dynamic.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Mon, 01 Aug 2005 21:23:51 +0300
From: Ilmari Karonen <usenet@vyznev.invalid>
Subject: Re: Old C dog.
Message-Id: <slrndesq5n.2u1.usenet@boojum.home.vyznev.net>
Damian James <djames@thehub.com.au> kirjoitti 01.08.2005:
> On Fri, 29 Jul 2005 08:10:23 -0500, Kent Feiler said:
>> Does the "or" check an internal Perl program field, or the final value
>> of $a, or the return from b()? I think I'd understand it if someone
>> would tell me whether z() is executed in the following statements:
>>
>> $a = 0 or z();
>
> In that statement, z() will never be executed. If you were to write that as
>
> $a = ( 0 or z() );
> or
> $a = 0 || z();
>
> Then z() will be called every time.
Did you check that?
$ perl -le '$a = 0 or print "Oops!"'
Oops!
Remember, the value of scalar assignment is the value being assigned.
That's so that you can write "$a = $b = 123", but it also makes it
easy to both save and check a value in one statement. You've probably
seen this idiom used like this:
my $arg = shift or die "Missing argument!\n"
--
Ilmari Karonen
To reply by e-mail, please replace ".invalid" with ".net" in address.
------------------------------
Date: Mon, 01 Aug 2005 19:58:16 GMT
From: Derf <i.gave.up.my.privacy@gmail.com>
Subject: Re: regex help
Message-Id: <Xns96A59721AF602igaveupmyprivacygmai@24.93.43.119>
Tom Regner <regner@dievision.de> wrote in
news:42edfc2e$0$15214$4d3ebbfe@news1.pop-hannover.net:
> Derf wrote:
>
Thanks for your help!
------------------------------
Date: Mon, 1 Aug 2005 11:47:38 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: sendmail Help Please
Message-Id: <slrndeskha.l5l.tadmc@magna.augustmail.com>
jane@rifill.com <jane@rifill.com> wrote:
> On Mon, 1 Aug 2005 07:57:29 +1200, "Tintin" <tintin@invalid.invalid> wrote:
>>[snipped low level SMTP code that would be better done using one of the
>>higher level mail modules]
>
> Sorry what do you mean on th above
There are many modules for sending mail where you never have
to mess with sockets and whatnot yourself. This is much much
easier than trying to repair some (nameless) OPC (Other People's Code).
Have you read the Perl FAQ entry for _your_ Frequently Asked Question?
perldoc -q mail
How do I send mail?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 01 Aug 2005 19:13:27 GMT
From: jane@rifill.com
Subject: Re: sendmail Help Please
Message-Id: <jurse1hpt8br63leoh74uo3qnnrttpcrf4@4ax.com>
Hi Tad
On Mon, 1 Aug 2005 11:47:38 -0500, Tad McClellan <tadmc@augustmail.com> wrote:
>jane@rifill.com <jane@rifill.com> wrote:
>> On Mon, 1 Aug 2005 07:57:29 +1200, "Tintin" <tintin@invalid.invalid> wrote:
>
>
>>>[snipped low level SMTP code that would be better done using one of the
>>>higher level mail modules]
>>
>> Sorry what do you mean on th above
>
>
>There are many modules for sending mail where you never have
>to mess with sockets and whatnot yourself. This is much much
>easier than trying to repair some (nameless) OPC (Other People's Code).
>
>Have you read the Perl FAQ entry for _your_ Frequently Asked Question?
>
> perldoc -q mail
>
> How do I send mail?
Yes that was the first place I had a look in BUT
When I put in c:\perl\bin
perldoc -q mail I get a error as
Can't spawn "cmd.exe": No such file or directory at c:/perl/lib/pod/perldoc.pm
I did a search on google and found nothing about perdoc, loads of other stuff.
So I gave up in the end.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 V10 Issue 8298
***************************************