[18219] in Perl-Users-Digest
Perl-Users Digest, Issue: 387 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 1 11:05:38 2001
Date: Thu, 1 Mar 2001 08:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <983462710-v10-i387@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 1 Mar 2001 Volume: 10 Number: 387
Today's topics:
ANNOUNCE: AppConfig::Std <neilb@cre.canon.co.uk>
ANNOUNCE: Inline 0.32 (Brian Ingerson)
ANNOUNCE: Lingua::En::Fathom v1.04 <kimaryan@ozemail.com.au>
ANNOUNCE: Lingua::En::NameParse v1.11 <kimaryan@ozemail.com.au>
ANNOUNCE: Locale::SubCountry v1.06 <kimaryan@ozemail.com.au>
Re: Bug report: splice/stringification <bart.lateur@skynet.be>
Re: DBI Proxy: Constructor didn't return a handle <bkennedy99@Home.com>
Re: fork() and ActiveState Perl - workarounds? (Win32 <bkennedy99@Home.com>
Help with consolidating a regex <bniknar@yahoo.com>
Re: Help with consolidating a regex <tom@power.net.uk>
help: how to open ftp-browser in microsoft style <verdien_guldens@hotmail.com>
Re: How are SOL_SOCKET and SO_REUSEADDR defined in vari (Kenny McCormack)
Re: NIC Fail-Over Script <bkennedy99@Home.com>
Re: not sure to post it here <www0028@garnet.acns.fsu.edu>
Perl Mongers Required in Chicago! <RTASHA@prodigy.net>
Re: Perl Mongers Required in Chicago! (Anno Siegel)
Re: Perl string <bart.lateur@skynet.be>
Re: Perl, Cookies, and Apache. <parrot0123@yahoo.ca>
perlpod docs? <ivo.nospam@yale.edu>
Re: perlpod docs? (Rafael Garcia-Suarez)
Re: print "</tr><tr>" vs. print $tr (Anno Siegel)
Re: print "</tr><tr>" vs. print $tr (Abigail)
Problems executing Perl from C. Appreciate advice or co <zonnebloem@zonnet.nl>
Re: Sorting by date (Helgi Briem)
Win32 output problem <azzaro@oswego.edu>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 1 Mar 2001 11:58:34 GMT
From: Neil Bowers <neilb@cre.canon.co.uk>
Subject: ANNOUNCE: AppConfig::Std
Message-Id: <t9smb24se6veaa@corp.supernews.com>
The first public version of AppConfig::Std is now on CPAN:
http://www.cpan.org/authors/id/NEILB/AppConfig-Std-1.03.tar.gz
This is a subclass of AppConfig - Andy Wardley's module for handling
script configuration parameters, from the command-line, config files, etc.
AppConfig::Std defines five standard options for a script, and handles
them if they're used:
-help display the OPTIONS section of a script's pod
-doc display all of the script's inline doc
-version display the version of the script
-verbose turn on verbose progress / status reporting
-debug turn on debugging output
Pod::Usage is used for the -help and -doc options. It expects that
your script's pod is well-formed and follows appropriate conventions.
See perlpod and pod2man for more details.
Neil
------------------------------
Date: 1 Mar 2001 14:31:03 +0100
From: briani@ActiveState.com (Brian Ingerson)
Subject: ANNOUNCE: Inline 0.32
Message-Id: <t9smap19hu13a3@corp.supernews.com>
Inline-0.32 has been uploaded to CPAN.
INTRODUCTION:
Inline.pm - Write Perl subroutines in other programming languages.
Inline lets you write Perl subroutines in other programming languages like C.
You don't need to compile anything. All the details are handled transparently
so you can just run your Perl script like normal.
Example:
use Inline C => <<'END';
SV* JAxH(char* x) {
return newSVpvf ("Just Another %s Hacker",x);
}
END
print JAxH('Inline'), "\n";
When run, this complete program prints:
Just Another Inline Hacker
The one line version is:
perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf("Just Another %s Hacker",x);}};print JAxH+Inline'
-------------------------------------------------------------------------------
FEATURES:
Inline version 0.32 is a minor upgrade with the following changes:
+ Addition of UNTAINT, SAFEMODE, GLOBAL_LOAD, MAKE, and LDDLFLAGS
configuration options.
+ Fixed all reported (and some unreported) bugs.
+ Documentation enhancements.
Inline version 0.31 is a minor upgrade with the following changes:
+ "use Inline C;" is now a synonym for "use Inline C => DATA;"
+ Default build/install directory changed from "blib_I/" to ".Inline/"
+ Build/Install directory structure simplified.
+ Short install paths.
+ Build areas in ".Inline/build/" subdirectory.
+ Added 'CC', 'CCFLAGS', 'LD', and 'LDFLAGS' config options to C.
+ More recipes in Cookbook.
Inline version 0.30 is a major upgrade from previous verions. It includes:
+ Integrated support for typemap files in C.
+ All the recognized types now come *only* from typemaps.
+ The default types come from the default typemap installed with core Perl.
+ Typemaps are used to modify the Parse::RecDescent grammar for parsing C.
+ This means you can easily use your existing typemaps.
+ Language support completely separated from base Inline code.
+ Beta supoort for C (Inline::C, included)
+ Alpha support for C++ (Inline::CPP, available separately)
+ Alpha support for Python (Inline::Python, available separately)
+ Support for 'embedding' Perl in C with my new programming language, CPR.
(Inline::CPR, available separately) This one may warp your mind :^)
+ Simple API for adding your own language support.
+ Write your own Inline::Foo
+ Write your own implementation of Inline::C, or just modify
Inline::C::grammar.
+ Support for interpreted languages in addition to compiled ones.
+ Autodetection of new Inline language modules.
+ Much easier and more powerful configuration syntax.
+ More XS and MakeMaker features exposed for configuration (for C and C++).
+ Flexible new syntax for specifying source code.
+ Use DATA section for AutoLoader, Inline, and POD simultaneously.
+ Support for using Inline 'with' other modules.
+ "use Inline with 'Event';" lets Event.pm pass config info to Inline.pm.
+ Event.pm 0.80 has built in support for Inline.pm 0.30 and higher.
+ Write Event callbacks in C with extreme ease.
+ More documentation
+ perldoc Inline
+ perldoc Inline-FAQ
+ perldoc Inline-API
+ perldoc Inline::C
+ perldoc Inline::C-Cookbook
+ Better error messages and easier debugging.
+ Mailing list: inline@perl.org
Other features of Inline.pm include:
= Automatically compiles your source code and caches the shared object.
= Automatically DynaLoads the shared object and binds it to Perl.
= Recompiles only when the C code changes.
= Changing the Perl code will not cause a recompile of the C code.
= Support for writing extension modules, suitable for distributing to the CPAN.
= Support for generating and binding Inline subs at run time. <bind()>
= Works on all Unix and MS Windows configurations.
-------------------------------------------------------------------------------
INSTALLATION:
This module requires the Digest::MD5 and Parse::RecDescent modules. It also
requires the appropriate C compiler. (Where appropriate means the one referred
to in your Config.pm)
To install Inline do this:
perl Makefile.PL
make
make test
make install
On ActivePerl for MSWin32, use nmake instead of make. Or just use:
ppm install Inline
For convenience, Inline::C is packaged with Inline, and will be automatically
installed as well.
-------------------------------------------------------------------------------
INFORMATION:
= For more information on Inline, see 'perldoc Inline' and 'perldoc Inline-FAQ'
= For information about Inline::, see 'perldoc Inline::C' and
'perldoc Inline::C-Cookbook'
= For information on writing your own Inline extension see 'perldoc Inline-API'
= For information about the Perl5 internal C API, see 'perldoc perlapi' or
try http://www.perldoc.com/perl5.6/pod/perlapi.html
= The Fall 2000 edition of The Perl Journal has an article about Inline
The Inline.pm mailing list is inline@perl.org. Send email to
inline-subscribe@perl.org to subscribe.
Please send questions and comments to "Brian Ingerson" <INGY@cpan.org>
Copyright (c) 2001, Brian Ingerson. All Rights Reserved.
--
Posted from gw.activestate.com [209.17.183.249]
via Mailgate.ORG Server - http://www.Mailgate.ORG
------------------------------
Date: Thu, 1 Mar 2001 20:37:09 +1100
From: "Kim Ryan" <kimaryan@ozemail.com.au>
Subject: ANNOUNCE: Lingua::En::Fathom v1.04
Message-Id: <t9smb9bjqlntb3@corp.supernews.com>
A revised version of the Lingua::En::Fathom module has been placed on CPAN.
This module provides readability and other statisitics for English text.
This release has major changes to the module, check the CHANGES file for
details.
------------------------------
Date: Thu, 1 Mar 2001 20:35:59 +1100
From: "Kim Ryan" <kimaryan@ozemail.com.au>
Subject: ANNOUNCE: Lingua::En::NameParse v1.11
Message-Id: <t9smbff6uromb8@corp.supernews.com>
A revised version of the Lingua::En::NameParse module has been placed on
CPAN. This module provides routines for manipulating a persons name. This
release has major changes to the module, check the CHANGES file for details.
------------------------------
Date: Thu, 1 Mar 2001 20:30:32 +1100
From: "Kim Ryan" <kimaryan@ozemail.com.au>
Subject: ANNOUNCE: Locale::SubCountry v1.06
Message-Id: <t9smbld3nnnfc0@corp.supernews.com>
A revised version of the Locale::SubCountry module has been placed on
CPAN. This module converts state, province, county etc. names to/from theri
ISO 3166-2 code. This release has major changes to the module, check the
CHANGES file for details.
------------------------------
Date: Thu, 01 Mar 2001 14:15:56 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Bug report: splice/stringification
Message-Id: <4ems9tc31gjk7h78bvip9nhvaiahlk8dkf@4ax.com>
Martien Verbruggen wrote:
>If I could, I'd be rich, and not here.
I would. The latter.
--
Bart.
------------------------------
Date: Thu, 01 Mar 2001 14:13:55 GMT
From: "Ben Kennedy" <bkennedy99@Home.com>
Subject: Re: DBI Proxy: Constructor didn't return a handle
Message-Id: <DOsn6.4727$Ok4.680988@news1.rdc1.ct.home.com>
"S P Arif Sahari Wibowo" <arifsaha@yahoo.com> wrote in message
news:Pine.LNX.4.21.0102280932390.1080-100000@gede.parokinet.org...
> The Oracle part using DBD::Oracle has been tried both locally and
> remotely. I tried to run the script from the same machine (the database
> server) with same error. I confirmed that dbiproxy is running. I tried
> mode=single & mode=fork with no change.
Have you managed to connect to the Oracle server directly from the maching
that is running the proxy? In other words, you should verify that the
Oracle driver is configured correctly before trying to forward connections
via DBI. Also, insert a 'debug' => 1 into your config file, it should help
you diagnose your problems. Hope this helps--
--Ben Kennedy
------------------------------
Date: Thu, 01 Mar 2001 14:20:22 GMT
From: "Ben Kennedy" <bkennedy99@Home.com>
Subject: Re: fork() and ActiveState Perl - workarounds? (Win32 programming question)
Message-Id: <GUsn6.4744$Ok4.682262@news1.rdc1.ct.home.com>
"Kenny McCormack" <gazelle@yin.interaccess.com> wrote in message
news:97je31$mb1$1@yin.interaccess.com...
> I am using ActiveState build 522 (Yes, I know it is a little old, but deal
> with it - if a later version will fix the problem, that's to the good)
There has been fork() emulation in Win32 perl for a while now, you can grab
the latest version at www.activestate.com, of if you are feeling industrious
you can compile it yourself. If you are looking for a workaround for a
network daemon, you could always run a multiplexing IO::Select loop to
listen for and respond to multiple file handle reads and writes, there are
good examples of this in the Perl Cookbook (Ram). Hope this helps
--Ben Kennedy
------------------------------
Date: Thu, 1 Mar 2001 07:04:20 -0800
From: "Brian Rankin" <bniknar@yahoo.com>
Subject: Help with consolidating a regex
Message-Id: <uytn6.3965$qv3.1688129@nnrp5-w.sbc.net>
I have:
$line=~s/- (.*?)<\/dt>//i;
$title=$1;
$title =~ s/^\s+//; ## strip leading spaces
$title =~ s/\s+$//; ## strip trailing spaces
Can these be combined more efficiently?
Thanks, Brian
bniknar@yahoo.com
------------------------------
Date: Thu, 01 Mar 2001 15:20:13 +0000
From: Tom Scheper <tom@power.net.uk>
Subject: Re: Help with consolidating a regex
Message-Id: <n2qs9to9lavuu2gbufumed2n1i21kvcjt0@4ax.com>
On Thu, 1 Mar 2001 07:04:20 -0800, "Brian Rankin" <bniknar@yahoo.com>
shed a beam of light on us:
>I have:
>
> $line=~s/- (.*?)<\/dt>//i;
> $title=$1;
> $title =~ s/^\s+//; ## strip leading spaces
> $title =~ s/\s+$//; ## strip trailing spaces
>
>Can these be combined more efficiently?
($title)=$line=~m/- \s*(.*?)\s*<\/dt>//i;
I didn't test it, but it should work I think.
-=Cornelis
------------------------------
Date: Thu, 1 Mar 2001 15:13:20 +0100
From: "Mike" <verdien_guldens@hotmail.com>
Subject: help: how to open ftp-browser in microsoft style
Message-Id: <3a9e58b6$0$16135@reader2>
Dear reader,
I am only a student trying to make some extra money by programming. I do not
know everything, please understand.
I have a question.
I wish to open a new browser window for ftp purposes. In the original
browser windows I leave almost untouched. I only increase the number of
views here. But by doing this with the following line...
(first part is to increase views for the particular id & second part is to
open a new browser window
<a href="$dcscript?action=redirect&id=$link[$field_id{"ID"}] & URL=
ftp://$link[$field_id{"FTP-server"}]:$link[$field_id{"Port"}]"
target="_blank">
I get in the new ftp browser the unix style directory listing... while I
would like to have the simpeler microsoft style directory listing, just as
if you type in your browser ftp://mpeg3c:mpeg3c@cls.dhs.org/ (classical
music mp3's). Is this a common know problem, and if so.. how to solve it?
Kind regards
Mike
------------------------------
Date: 1 Mar 2001 09:29:13 -0600
From: gazelle@yin.interaccess.com (Kenny McCormack)
Subject: Re: How are SOL_SOCKET and SO_REUSEADDR defined in various flavors of Unix?
Message-Id: <97lps9$5ih$1@yin.interaccess.com>
In article <9hhn6.27$5t5.30758@burlma1-snr2>,
Barry Margolin <barmar@genuity.net> wrote:
...
>>Seems clear enough to me. But this *is* the sort of thing that makes people
>>want to write stuff in C, and not dick around with scripting languages.
>
>You really think that a site that can't manage to install Perl properly
>will be able to compile a C program? What makes you think they'll even
>have a C compiler available? And wouldn't you then have to dick around
>with things like autoconf to ensure portability to all the different
>flavors of Unix? Or would you give up on portability and just ship binary?
This *is* the usual solution in the real world. Real world commercial
software is almost always shipped as binary only - and considerable effort
is made to ensure that it requires little (and in most cases, no) additional
software (libs, etc) on the client machines, beyond the basic OS install.
C binaries depend, of course, on /lib and /usr/lib (and possibly others,
e.g., /usr/X11R6/lib), but do not depend on header files or any other
development stuff.
>Maybe the solution for your problem is to write the script in perl, and
>have it read the appropriate header files in /usr/include to find the
>values.
This is a reasonable suggestion, and I have considered it. My original
point in posting was to find out if there was sufficient variation among the
various Unixes (specifically, those beyond Linux and Solaris) to justify the
effort.
------------------------------
Date: Thu, 01 Mar 2001 14:07:15 GMT
From: "Ben Kennedy" <bkennedy99@Home.com>
Subject: Re: NIC Fail-Over Script
Message-Id: <nIsn6.4710$Ok4.680366@news1.rdc1.ct.home.com>
"Simon Parkes" <simon.parkes@easynet.co.uk.nospam> wrote in message
news:0Y7n6.82417$Dd3.1341904@monolith.news.easynet.net...
> What I want is to have one NIC running with a script checking to see if
all
> is okay, if the script detects a problem, it brings down the interface and
> then brings up the other using same IP params ...
Are you trying to diagnose the NIC cards from within Perl itself? This
seems like a task best suited for utilities that already exist. Your best
bet may be to run all your diagnostics with external programs (ifconfig,
ifup, ifdown etc on linux) and just use Perl functionally as a shell script
(using system() or backticks to call external programs), maybe parsing the
output of those commands. You could also verify the connection with a few
basic net commands to make sure everything works (using Net::Ping, LWP,
etc). Hope this helps--
--Ben Kennedy
------------------------------
Date: Thu, 01 Mar 2001 11:07:28 -0500
From: Bill Wang <www0028@garnet.acns.fsu.edu>
Subject: Re: not sure to post it here
Message-Id: <3A9E73C0.71A5184A@garnet.acns.fsu.edu>
oh, made a mistake. should go to javascript.
nobull@mail.com wrote:
> Bill Wang <www0028@garnet.acns.fsu.edu> writes:
>
> > Newsgroups: comp.lang.perl.misc
> > Subject: not sure to post it here
>
> Post here if and only if your question is in some whay related to the
> Perl programming language and not easily answered by consulting the
> standard documentation or by searching a Usenet archive of this
> newsgroup.
>
> [snip question in no way shape or form even remotely related to Perl ]
>
> You may just as well have asked about how to cook oysters. Oysters
> contain pearls. "Pearl" sounds like "Perl". So questions about oyster
> cooking are on-topic, surely?
>
> --
> \\ ( )
> . _\\__[oo
> .__/ \\ /\@
> . l___\\
> # ll l\\
> ###LL LL\\
------------------------------
Date: Thu, 1 Mar 2001 08:39:30 -0000
From: "Natasha Manning" <RTASHA@prodigy.net>
Subject: Perl Mongers Required in Chicago!
Message-Id: <97lnib$3162$1@newssvr05-en0.news.prodigy.com>
Dear Consultant
Our client in Downtown Chicago has an
immediate need for
several Perl Developers (GURU Level).
Successful candidates will be developing client side applications and will
be able to join a large progressive company that is a leader
in their industry. Our client is looking for several
experienced developers who can code for their in house trading system this
is an excellent opportunity for income and career growth
for motivated and talented individuals.
All client locations are in Downtown locations.
All clients pay for expenses!
Candidates must possess:
2+ years of Perl development
Different Perl versions.
Excellent understanding of the Perl language
troubleshoot and resolve programming problems.
Ability to work on multiple projects.
Our firm specializes in recruiting computer professionals for both
permanent and contract positions. We have many openings across
a wide range of software platforms. For consideration, please either
attach your resume (as a separate MS Word or Wordperfect file) to
an email message, or you can fax your resume to us (in fine resolution mode)
at the number below. All inquiries are treated as strictly confidential.
You MUST be a US citizen or permanent resident to apply
Mark Lewis
847-438-4205
Getting I.T Done Right
The First Time
------------------------------
Date: 1 Mar 2001 15:14:31 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl Mongers Required in Chicago!
Message-Id: <97lp0n$nhf$1@mamenchi.zrz.TU-Berlin.DE>
According to Natasha Manning <RTASHA@prodigy.net>:
> Dear Consultant
> Our client in Downtown Chicago has an
> immediate need for
> several Perl Developers (GURU Level).
This is off topic in a technical newsgroup. Find one with 'job' in
the name.
[...]
> You MUST be a US citizen or permanent resident to apply
Thanks for posting this to an international forum.
Anno
------------------------------
Date: Thu, 01 Mar 2001 14:11:23 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Perl string
Message-Id: <63ms9t8bcgcj727rnba47ef6nlpp0k5pvt@4ax.com>
Raja Banerjee wrote:
>I am trying to run a system command like
>mailx name@host.com -r "login2@host.com" < filename
>from a perl program .
>Theproblem is with the inverted commas .I have not been able to figure
>out how to invoke it so that it works.
print reverse ',,,';
But, seriously, if you're trying something like
system("mailx ...");
then put a backslash in front of the '"' and the '@'. Or use single
quotes instead, you're not interpolating anything anyway.
--
Bart.
------------------------------
Date: Thu, 01 Mar 2001 15:26:38 GMT
From: "Parrot" <parrot0123@yahoo.ca>
Subject: Re: Perl, Cookies, and Apache.
Message-Id: <OStn6.321990$f36.11485095@news20.bellglobal.com>
Okay, but I don't have a domain name. I'm using the server mostly for
testing purposes right now, there's no reason to go to the expense of
getting one. What should I use as a host name? I've tried localhost, as
well as the IP address. Neither of them work.
----- Original Message -----
From: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
Newsgroups: comp.lang.perl.misc
Sent: Thursday, March 01, 2001 12:43 AM
Subject: Re: Perl, Cookies, and Apache.
> You mean, your browser doesn't accept cookies. That's because the
> hostname of your local machine doesn't match the hostname given in the
> code that sets cookies.
>
> Hopefully, this domain name is defined once and for all in a main
> configuration file (a module or a .pl) and it will be very easy to fix.
>
> > Is there something I have to do so that I'll be able to use cookies? Is
> > there something that says that cookies can't be set from your local
server?
> > Anybody have any answers?
>
> That kind of questions are usually better answered in one of the
> comp.infosystems.www.servers.* groups. They're not perl-related.
>
> --
> Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Thu, 01 Mar 2001 10:11:59 -0500
From: ivo welch <ivo.nospam@yale.edu>
Subject: perlpod docs?
Message-Id: <3A9E66BF.771EC847@yale.edu>
I have been trying to decipher the perlpod documentation. not clear at
all. (For example, the docs did not mention that one needed a "=cut"
after the "=head" statements. pod2html complains about wanting a title,
but this is nowhere described either.) A couple of complete example
files (with perl) would definitely help...has anyone put together a page
of examples?
/iaw
------------------------------
Date: Thu, 01 Mar 2001 15:52:00 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: perlpod docs?
Message-Id: <slrn99ss0b.5vb.rgarciasuarez@rafael.kazibao.net>
ivo welch wrote in comp.lang.perl.misc:
>
> I have been trying to decipher the perlpod documentation. not clear at
> all. (For example, the docs did not mention that one needed a "=cut"
> after the "=head" statements. pod2html complains about wanting a title,
> but this is nowhere described either.) A couple of complete example
> files (with perl) would definitely help...has anyone put together a page
> of examples?
If you have Perl installed, you don't need other examples. The POD
source for the standard docs is included (on my machine, it's in the
/usr/local/lib/perl5/5.6.0/pod directory). The source of the standard
Perl modules also contain POD documentation.
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
package another; sub AUTOLOAD { $AUTOLOAD =~ /::(.*)/;"$1 @_"; }
package hacker; sub AUTOLOAD { $AUTOLOAD =~ /::(.*)/;"$1 @_,\n"; }
print Just another Perl hacker;
------------------------------
Date: 1 Mar 2001 14:26:29 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: print "</tr><tr>" vs. print $tr
Message-Id: <97lm6l$jbv$2@mamenchi.zrz.TU-Berlin.DE>
According to Stan McCann <stan_no_spam_for_me@alamo.nmsu.edu>:
[...]
> Sorry, but the documentation sucks. I can't get the table calls to work
> at all, to say nothing about conveniently.
Looks like a case of PEBKAC to me.
Anno
------------------------------
Date: 1 Mar 2001 15:57:52 GMT
From: abigail@foad.org (Abigail)
Subject: Re: print "</tr><tr>" vs. print $tr
Message-Id: <slrn99ssc0.eh.abigail@tsathoggua.rlyeh.net>
Stan McCann (stan_no_spam_for_me@alamo.nmsu.edu) wrote on MMDCCXXXVIII
September MCMXCIII in <URL:news:3A9D8910.8C8D1C27@alamo.nmsu.edu>:
`` "Alan J. Flavell" wrote:
`` >
`` > On Wed, 28 Feb 2001, Stan McCann wrote:
`` >
`` > > Where do I find *good* documentation on using the cgi.pm module?
`` >
`` > Did you even try? Although "cgi.pm" isn't really correct, suppose we
``
`` Yes, I did try. I also know that cgi.pm isn't correct, I'm a lazy typer
`` and only use caps when I have to.
AH, ok, so you don't expect other people to read what you type.
Fine. Then I'll make sure I'll rever ead you again.
*plonk*
If you're too lazy to type correctly, don't bother showing up on usenet.
Abigail
--
@_=map{[$!++=>$_^$/]}split$²=>"\@\x7Fy~*kde~box*Zoxf*Bkiaox";$\="\r";
$|=++$*;do{($#=>$=)=(rand@_=>rand@_);@_[$#,$=]=@_[$=,$#]}for($*..@_);
for$:($|..@_-$|){for($|..@_-$:){@_[$_-$|,$_]=@_[$_=>$_-$*]if$_[$_][$¼
]<$_[$_-$*][$®];print+map{$_->[$|]}@_;select$·,$°,$½,"$[.$|"}}print$/
------------------------------
Date: Thu, 01 Mar 2001 16:00:46 +0100
From: Jurgen Boerboom <zonnebloem@zonnet.nl>
Subject: Problems executing Perl from C. Appreciate advice or coding example
Message-Id: <3A9E641E.B2D29BEC@zonnet.nl>
I´m trying to execute a perl script/subroutine from a C program. After
going through the Perl documentation several times and examining the
examples I have written some code that compiles....almost. I get some
errors and warnings in the line with the perl_call statetments and pel
macro´s. Searching through the perl sources to find what I have done
wrong doesn´t get me any further.
The essential part from my C program looks like this:
/* Perl stuff */
#include <EXTERN.h>
#include <perl.h>
#include "XSUB.h"
....Code removed....
static char user_filename[128];
static char * PerlScriptParameters[] = {user_filename, NULL} ;
static PerlInterpreter *my_perl = NULL;
int perl_argc = 0;
char * perl_argv[2];
..... Code removed .....
if (strlen(caPerlScript) != 0) {
my_perl = perl_alloc();
perl_construct(my_perl);
perl_argc = 2;
perl_argv[0] = NULL;
perl_argv[1] = caPerlScript;
perl_retval = perl_parse(my_perl, NULL, perl_argc,
perl_argv, NULL); // Interpret the script
..... Code removed ......
dSP;
ENTER;
SAVETMPS;
PUSHMARK(sp);
XPUSHs(sv_2mortal(newSVpv(user_filename, 0)));
PUTBACK;
perl_call_pv("CPMS_TRIGGER", G_SCALAR);
SPAGAIN;
ret = POPi;
PUTBACK;
FREETMPS;
LEAVE;
The error message from Microsoft Visual C++ shown below. The first error
(line 461) is the line with dSP; Although there are many error message
the most are caused by the failure of the dSP macro and de missing of
identifier ´sp´. Which I cannot find anywhere in the perl code. Do I
have to declare it my self ?
(461) : error C2143: syntax error : missing ';' before 'type'
(461) : error C2143: syntax error : missing ';' before 'type'
(464) : error C2065: 'sp' : undeclared identifier
(464) : error C2113: pointer can only be subtracted from another pointer
(465) : warning C4047: '<' : 'struct sv ** ' differs in levels of
indirection from 'const int '
(465) : warning C4047: 'function' : 'struct sv ** ' differs in levels of
indirection from 'int '
(465) : warning C4024: 'Perl_stack_grow' : different types for formal
and actual parameter 1
(465) : warning C4047: 'function' : 'struct sv ** ' differs in levels of
indirection from 'int '
(465) : warning C4024: 'Perl_stack_grow' : different types for formal
and actual parameter 2
(465) : warning C4047: '=' : 'int ' differs in levels of indirection
from 'struct sv ** '
(465) : error C2100: illegal indirection
(465) : warning C4047: '=' : 'int ' differs in levels of indirection
from 'struct sv *'
(465) : error C2106: '=' : left operand must be l-value
(466) : warning C4047: '=' : 'struct sv ** ' differs in levels of
indirection from 'int '
(468) : warning C4047: '=' : 'int ' differs in levels of indirection
from 'struct sv ** '
(470) : error C2100: illegal indirection
(470) : warning C4047: '=' : 'struct sv *' differs in levels of
indirection from 'int '
(471) : warning C4047: '=' : 'struct sv ** ' differs in levels of
indirection from 'int '
Thanks, Jurgen Boerboom
------------------------------
Date: Thu, 01 Mar 2001 14:41:31 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: Sorting by date
Message-Id: <3a9e5e66.1725802282@news.itn.is>
On Thu, 1 Mar 2001 09:20:00 -0000, "Brian J"
<sorryno@email.at.all> wrote:
>> Have you decided yet if stat () is supported
>> by Windows NT?
>>
>> Godzilla!
>
>
>I don't know, I pressume it doesn't. I looked in my Perl book and it
>just says "The actual values in the list differ slightly depending on
>which operating system you're running because some operating systems
>include features that others might not implement".
>
stat($file) works fine on NT, but returns 0 for uid and gid
because those attributes are somewhat different in NT and
not directly comparable.
Regards,
Helgi Briem
------------------------------
Date: Thu, 1 Mar 2001 14:03:27 GMT
From: "Matthew Azzaro" <azzaro@oswego.edu>
Subject: Win32 output problem
Message-Id: <G9IuwI.C1o@oswego.Oswego.EDU>
Hello, I am new at Perl and having a problem. The code below is to select a
random quote from a file, and print it in HTML format. It works fine on
Unix/Apache, and on Win2K from the command prompt, but when I try to access
it through a browser, everything outputs fine except for the quote and
auther ($quote[0] and $quote[1]). Where is it going??? I tested before and
after the HTML output to make sure the array is correct and contains data,
and it does. Please email me directly at azzaro@oswego.edu with any advice.
Thank you!! Here is the code
-Matt
**********************************
#! /usr/local/bin/perl -w
use Win32;
#READ INPUT FILE
if (! open (QUOTES,"quotes.dat")) {
print "Error opening file: $!\n";
}
srand;
rand($.) <1 and ($line=$_) while <QUOTES>;
close QUOTES;
@quote = split(/\*/,$line);
print <<As_Is;
Content-type: text/html
<HTML><BODY><TABLE><TR><TD><I>$quote[0]</TD></TR><TR><TD
ALIGN=RIGHT>$quote[1]</TD></TR></TABLE></BODY></HTML>
As_Is
exit (0);
------------------------------
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 V10 Issue 387
**************************************