[12354] in Perl-Users-Digest
Perl-Users Digest, Issue: 5954 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 10 21:07:55 1999
Date: Thu, 10 Jun 99 18:00:24 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 10 Jun 1999 Volume: 8 Number: 5954
Today's topics:
Re: "System" function delays output <rootbeer@redcat.com>
Accessing Perl modules in VBScript-ASP-pages (Jeroen Kustermans)
activestate - silent install ?? <dsmith@nospamdynamicnetworks.co.uk>
Re: CGI and Access Database <rootbeer@redcat.com>
Re: CGI script from win32 -> IE4.0 <wyzelli@yahoo.com>
Re: Detecting a File Download Cancel <rootbeer@redcat.com>
Re: dimensions of a jpg file <rootbeer@redcat.com>
Re: E-mail a file as an attachment. <cassell@mail.cor.epa.gov>
Re: ENV Question <rootbeer@redcat.com>
Re: Examples, sources and tutorials <tchrist@mox.perl.com>
ie4 and perl...? <sova0001@algonquinc.on.ca>
Is anyone here tonight <jgrain@yahoo.com>
MIcrosofts Attack on Perl <jgrain@yahoo.com>
Re: MIcrosofts Attack on Perl <rootbeer@redcat.com>
ms sql databases and perl on unix victor@mill.net
Re: newbie question: Perl for sorting/generating html <rootbeer@redcat.com>
Re: Odd/Even Numbers? (Larry Rosler)
Re: Odd/Even Numbers? <rootbeer@redcat.com>
Re: OLE reference <cassell@mail.cor.epa.gov>
Re: Perl and non-constant strings <rootbeer@redcat.com>
Re: Perldoc and Perlfaq <tchrist@mox.perl.com>
Piping to script w/ command line arguments d_dave@my-deja.com
Re: Please Help!! <rootbeer@redcat.com>
Re: Requesting help in optimizing (Eric Bohlman)
Re: Require "No NT commands" on UNIX <anonymous@web.remarq.com>
Re: Require "No NT commands" on UNIX garthwebb@my-deja.com
Re: Require "No NT commands" on UNIX <anonymous@web.remarq.com>
Re: sendmail doesn't work <cassell@mail.cor.epa.gov>
shortest self printing perl program <kgnews@olympiakos.com>
Re: Signal/sleep hidden interaction? dhosek@quixote.com
Re: Taking a Poll..... (Larry Rosler)
Re: Taking a Poll..... <rootbeer@redcat.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 10 Jun 1999 17:13:17 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: "System" function delays output
Message-Id: <Pine.GSO.4.02A.9906101711550.26349-100000@user2.teleport.com>
On 10 Jun 1999, Andrew Allen wrote:
> print scalar(`command`);
> If you need a return code, you'll need to use piped opens (and
> closes).
Really? That's not what perlvar says. But maybe I misunderstand you.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 10 Jun 1999 23:32:59 GMT
From: NightLight@webcity.nl.NOSPAM!!!!!! (Jeroen Kustermans)
Subject: Accessing Perl modules in VBScript-ASP-pages
Message-Id: <37614aae.163830115@news.xs4all.nl>
Hi,
Is the feature described in the subject of this message possible?
I mean, how can I access LWP:: for example?
What do I have to include?
How do I access those properties?
Hope somebody know the answer,
Joe
------------------------------
Date: Fri, 11 Jun 1999 00:36:20 +0100
From: Donald Smith <dsmith@nospamdynamicnetworks.co.uk>
Subject: activestate - silent install ??
Message-Id: <37604BF4.6D3DFF97@nospamdynamicnetworks.co.uk>
Does anyone know if the Activestate can be installed silently.
Additionally can modules be installed silently.
I want to install the perl compiler on remote machines and I also want
to install the libnet module.
Ideally if I could tie everything up in a nice self extracting install
script then that would be pretty cool.
Anybody have any advice/pointers
TIA
Donald.
------------------------------
Date: Thu, 10 Jun 1999 17:03:48 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: CGI and Access Database
Message-Id: <Pine.GSO.4.02A.9906101658510.26349-100000@user2.teleport.com>
On Thu, 10 Jun 1999, Tom Renic wrote:
> My knowledge of CGI and perl is fairly limited. I have an Access
> Database File that I want hooked up to a form, so that the responses
> are added to the database. Is this possible?
If you can use the database from Perl, you can use it from a CGI program
written in Perl, in general. If you're not sure how to access the
database, check CPAN for a module which will help. If you're not sure how
to write programs which implement the CGI protocol, check the CGI module.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 11 Jun 1999 08:52:53 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: CGI script from win32 -> IE4.0
Message-Id: <iNX73.2$hR4.3290@vic.nntp.telstra.net>
duh <duh@pro.com> wrote in message news:928998479.665.67@news.remarQ.com...
> Hello, I'm stuck on getting started with perl. My basic problem is that
> when I try to open a perl script from IE4.0, IE4.0 gives me a dialog box
> asking me to either save the file, or to open it locally. When I open it
> locally, it runs the perl script, but doesn't output the results to the
> browser. How do I get the CGI script to output the data to a browser.
>
> Notes:
> 1) the script:
> print "Content-type: text/html/n/n";
> print "hello web surfer!";
> 2) I can run this script from the [dos] command line ok
> 3) The errors I get in IE4.0 depend on the settings in PWS (personal web
> server). My errors have included: "HTTP/1.1 500 Server Error", "404...",
> and "no read access". These different messages occur when I have various
> settings in PWS for read/execute/script access for either the wwwroot, or
> for cgi-bin directories. When I open up all of the permissions, is when I
> get the problem I've described at the top of the e-mail (runs, but doesn't
> return data to web browser).
> 4) I tried adding the #!..., but it appears to behave in the same manner
if
> I have that line or I don't (I'm assuming my path is set already).
> 5) Is there a setting in IE4.0 that would affect this?
> 6) Do I need another file association in the registry?
> 7) Note, I've just gotten started with this and have just loaded perl
5.17.
>
>
>
In addition to the above reply, you might also need to have set on the
server the 'run scripts' option for the dir the script is in. This is what
tells the server to run the script not download it. The associations from
the above reply are also needed.
Wyzelli
------------------------------
Date: Thu, 10 Jun 1999 16:58:16 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Detecting a File Download Cancel
Message-Id: <Pine.GSO.4.02A.9906101657250.26349-100000@user2.teleport.com>
On Thu, 10 Jun 1999, James Bott wrote:
> I am wondering if there is a way to detect when the user cancels from
> the download
It sounds as if you want to find out about how a protocol works. Probably
CGI or HTTP. The docs, FAQs, and newsgroups about those protocols should
be helpful. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 10 Jun 1999 16:54:15 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: dimensions of a jpg file
Message-Id: <Pine.GSO.4.02A.9906101652150.26349-100000@user2.teleport.com>
On Thu, 10 Jun 1999, Deamon George Scapin wrote:
> I am writing a perl script and need to find a way to get several
> dimensions. I need the dimensions of
>
> 1) An image
Use Image::Size from CPAN.
> 2) The viewer window
> 3) The screen size setting.
What viewer? What window? What screen? :-) If you're needing to
interrogate a remote device, such as a browser, you should check with the
docs, FAQs, and newsgroups about browsers and the protocols used with
them.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 10 Jun 1999 17:39:44 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: "Jon C. Morey" <jmorey@moreynet.com>
Subject: Re: E-mail a file as an attachment.
Message-Id: <37605AD0.791410E6@mail.cor.epa.gov>
[courtesy cc to poster]
Jon C. Morey wrote:
>
> I am using the SENDMAIL program to send a message via perl. It was
> quite easy to print the lines and get a file sent. I would like to send
> a file as an attachment. Can I do this via SENDMAIL or do I need a
> mime package?
Sorry, but you'll need MIME to handle attachments in any sort
of clean way. The easiest way to do this is to grab the
MIME::Lite module, which has really nice examples in its docs
too. If you're doing this on NT, get ActiveState's MIME-Lite
ppd from their site. If you're doing this on unix, go to
CPAN and get the module there.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 10 Jun 1999 17:25:45 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: ENV Question
Message-Id: <Pine.GSO.4.02A.9906101714190.26349-100000@user2.teleport.com>
On Thu, 10 Jun 1999 doug_brough@my-deja.com wrote:
> #!/home/orca/rfadba/perl5/bin/perl
> BEGIN {
> $ENV{LD_LIBRARY_PATH}="/usr/openwin/lib:/home/orca/rfadba/oracle7.3.4/lib";
> $ENV{ORACLE_HOME}="/home/orca/rfadba/oracle7.3.4";
> }
Now, you do know that those are the right variable names and values you
want. Right? (Just checking... :-)
> eval 'use Oraperl; 1' || print "error with Oraperl $@ $]\n";
I think that's not what you want. Here's a better way:
use Oraperl; # :-)
If you really need it, here's another way.
{
# Print extra info upon failure
my $success;
END {
print "Error occurred when loading Oraperl via perl $]\n"
unless $success;
}
use Oraperl;
BEGIN {
$success = 1; # get here only upon success
}
}
Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 10 Jun 1999 17:33:26 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Examples, sources and tutorials
Message-Id: <37604b46@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
u970130@studbo.hit.no (Thomas Weholt) writes:
:Is there a site on the net with lots of simple scripts, examples of
:whole programs etc.?
Here is a list of places to find examples of Perl code:
ftp://ftp.oreilly.com/published/oreilly/perl/cookbook/
http://language.perl.com/ppt/
http://www.perl.com/CPAN-local/authors/id/TOMC/scripts/
--tom
--
"A pithy saying is worth its weight in gold." --Larry Wall
------------------------------
Date: Thu, 10 Jun 1999 20:15:57 -0400
From: Jason Sova <sova0001@algonquinc.on.ca>
Subject: ie4 and perl...?
Message-Id: <3760553D.C1B47B88@algonquinc.on.ca>
Hi
I got me self a little problem here I was hoping maybe somebody
could help me out with. I've been writing some CGI using perl to put
together a online ordering system, and I've hit a snag. My Web server is
NT 4.0 running IIS 40, when running netscape 4.03 as my browser
everything works. The pages run displayed right in the windows that's
generated by the CGI. But when running ie4 as my browser when displaying
a page from the perl all the HTML is messed up. I extracted all the html
and opened in it ie4 as just a html file and it looks great. ??? I don't
understand this at all.
Jason
sova0001@algonquinc.on.ca
------------------------------
Date: Fri, 11 Jun 1999 00:29:45 +0100
From: jgrain <jgrain@yahoo.com>
Subject: Is anyone here tonight
Message-Id: <37604A69.EF3DD74F@yahoo.com>
Microsoft?
------------------------------
Date: Fri, 11 Jun 1999 00:21:45 +0100
From: jgrain <jgrain@yahoo.com>
Subject: MIcrosofts Attack on Perl
Message-Id: <37604888.E297EA75@yahoo.com>
What is the current strategy of those at the very top, i.e. those who
understand, believe and promote open source, particularly in reference
to its influence on reducing the cost of computing and spreading the net
of those involved in "serious" computing after the announcement that
Microsoft will be "hijacking" Perls advantages, for their own commercial
benefit.
Are people aware of the "negative" consequences of such a move,
especially in relation to one of Perls core ojectives in relation to
maintaining the language as "portable"?
An answer to this post would be very much appreciated as I am one of the
"few" who would actively participate in "movements" to counteract the
negative force of "inforced capatilism".
Awaiting a reply from the high command!
------------------------------
Date: Thu, 10 Jun 1999 17:59:37 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <Pine.GSO.4.02A.9906101744050.26349-100000@user2.teleport.com>
On Fri, 11 Jun 1999, jgrain wrote:
> What is the current strategy of those at the very top,
Oh, surely I'm not at the very top. Am I?
> i.e. those who understand, believe and promote open source,
Yes, oh yes, that's me....
> particularly in reference to its influence on reducing the cost of
> computing and spreading the net of those involved in "serious"
> computing after the announcement that Microsoft will be "hijacking"
> Perls advantages, for their own commercial benefit.
Which unbiased source said "hijacking"? :-)
> Are people aware of the "negative" consequences of such a move,
> especially in relation to one of Perls core ojectives in relation to
> maintaining the language as "portable"?
Yes. (I'm not speaking just for myself here, you understand. I have good
reason to believe that those "at the very top" are well aware of both the
positive and negative consequences of this development.)
> An answer to this post would be very much appreciated as I am one of
> the "few" who would actively participate in "movements" to counteract
> the negative force of "inforced capatilism".
It's good to know that you and others are ready to throw yourself upon a
grenade, if need be, for the good of Perl.
Speaking only for myself, I'd say that you can restrain from heroic
measures for the time being. I'm taking my cue from Larry Wall, who thus
far has neither hung lanterns in the bell-tower of his church nor ridden
a horse to Lexington while issuing a call to arms. As Larry is a very good
communicator, I'm certain that when he has something to say, he will find
a good way to say it.
There's been some discussion about this in this newsgroup already; see
your favorite Usenet archive for details.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 10 Jun 1999 22:42:02 GMT
From: victor@mill.net
Subject: ms sql databases and perl on unix
Message-Id: <7jpevo$v8m$1@nnrp1.deja.com>
I would like to access a Microsoft SQL server from a machine running
Solaris 2.7 using Perl. Has anybody had any luck with this, or knows
where I need to start looking?
thanks..
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 10 Jun 1999 17:11:22 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: newbie question: Perl for sorting/generating html
Message-Id: <Pine.GSO.4.02A.9906101705500.26349-100000@user2.teleport.com>
On 10 Jun 1999, Lee Schwabe wrote:
> I want to have a page generated on the fly that is like a
> thumbnail/browser thing for the directory. My thinking is to write a
> script that will look at each html page in the directory then, pull out
> the thumbnail jpg, one or two heading lines, possibly a couple lines of
> text from the article and generate the thumbnail page.
> Looking for the best way to do this, somebody suggested Perl.
Yes, with the help of LWP and some other modules, like HTML::Parser,
probably.
> (I'm no programmer, but did o.k. in my BASIC class years ago...)
>
> Any info/suggestions appreciated.
Start with a smaller project. It's not that you can't do this, but you can
do a small project and a related large one faster than the large one
alone, in this case. It'll be too painful a learning experience to try to
do this program when you say you're "no programmer".
Try first making a program which merely makes a page with links to the
other pages in the directory. (Check it with one of the HTML checkers to
ensure that it's valid HTML, too.) Then, when you've got that working, fix
it so that the link text for each page is the TITLE from the page. (Parse
the HTML with HTML::Parser.) That will be a challenging start right there.
Good luck with your project!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 10 Jun 1999 16:49:20 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Odd/Even Numbers?
Message-Id: <MPG.11c9eed7d5a6d316989bb9@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <Pine.LNX.4.10.9906111025220.1564-100000@brent.ihug.co.nz> on
Fri, 11 Jun 1999 10:28:06 +1200, Brent Singers <brent.s@ihug.co.nz>
says...
> Is there any way of Perl telling if a number is odd or even? I have a
> script where I need do do one thing if a numerical result is even, and
> something if it is odd...
Basic mathematics.
Either using the definitions of even and odd:
print "$n is odd\n" if $n % 2;
Or (not so good, IMO), using the binary representation of a number:
print "$n is odd\n" if $n & 1;
Learn all about the Perl operators from:
`perldoc perlop`
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 10 Jun 1999 17:43:00 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Odd/Even Numbers?
Message-Id: <Pine.GSO.4.02A.9906101742040.26349-100000@user2.teleport.com>
On Fri, 11 Jun 1999, Brent Singers wrote:
> Is there any way of Perl telling if a number is odd or even?
for (1..10) {
print "$_: yes there is\n" if $_ % 2;
}
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 10 Jun 1999 17:23:31 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: OLE reference
Message-Id: <37605703.E7290154@mail.cor.epa.gov>
Jonathan Stowe wrote:
>
> On Thu, 10 Jun 1999 10:55:03 -0700 David Cassell wrote:
> > Jonathan Stowe wrote:
> >> [snip]
> >><http://msdn.microsoft.com/officedev/preview/technical/articles/word.asp
> >
> > Oops. M$ has re-organized its site, and this page is kaput.
>
> Are you sure - I cut and paste right there and then and I dont use a
> cache or a proxy ...
I even tried it in Nyetscape, so I wouldn't have to risk a typo
or cut&paste error. Every time I get re-directed to an error page
which tells me that the page has been deleted or moved.
Boy, the nerve of some people, trying to fix up their websites...
:-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Thu, 10 Jun 1999 16:56:23 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl and non-constant strings
Message-Id: <Pine.GSO.4.02A.9906101654510.26349-100000@user2.teleport.com>
On Thu, 10 Jun 1999 sbeaulieu@my-deja.com wrote:
> I'm passing a char* from C++ to Perl. How does Perl handle a constant
> string as opposed to a passed char *? I'm interested into how the
> memory management works.
See the perlguts manpage to get started. If it's not in there, see the
source. :-)
But if you still have questions after seeing perlguts and the source (and
who wouldn't?) you could ask again here. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 10 Jun 1999 17:37:25 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perldoc and Perlfaq
Message-Id: <37604c35@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Gareth Rees <garethr@cre.canon.co.uk> writes:
:$ pod2man `pmpath Net::LDAP` | nroff -man
:/apps/perl5/bin/pod2man: Invalid man page - no documentation in /apps/perl5/lib/site_perl/5.005/Net/LDAP.pm
Notice:
Manifying blib/man3/URI::URL::ldap.3pm
/usr/local/perl/bin/pod2man: lib/URI/URL/ldap.pm is missing required section: DESCRIPTION
That is not valid documentation. Not my fault that people
are subclued. They need to fix it. Period.
--tom
--
"The mind is its own place, and of itself can make a heaven of hell, and a
hell of heaven"
- John Milton - "Paradise Lost"
------------------------------
Date: Thu, 10 Jun 1999 22:38:27 GMT
From: d_dave@my-deja.com
Subject: Piping to script w/ command line arguments
Message-Id: <7jpep2$v61$1@nnrp1.deja.com>
this is basically what i want to do on the commandline:
% echo "dog" | ./perlscript option1 option2
anyone know how to distinguish between the piped info and the command
line args?
So far Ive been able to distiguish the arguments by using the @ARGV
indicator but i havent been able to access the piped argument. Using <>
returns errors for the command line args but returns the piped args.
dave
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 10 Jun 1999 17:40:55 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Please Help!!
Message-Id: <Pine.GSO.4.02A.9906101726290.26349-100000@user2.teleport.com>
On Thu, 10 Jun 1999 coneliberation@my-deja.com wrote:
> Subject: Please Help!!
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> The cone liberation society needs your help.
So do 1e6 other worthy causes. What makes yours more important than all of
the others? Wait! Don't answer that rhetorical question; it would be off
topic here. The better (but still rhetorical) question is "What relevance
does your cause have to Perl?"
Ask not what c.l.p.misc can do for your charity....
> We are an international organisation dedicated to liberating traffic
> cones, an we're updating our webpages. This is where we need someones
> help.
Maybe you should ask in alt.fan.britney-spears. The people there seem to
have too much free time, just like you do. :-)
> We need to have a page where people can fill in details on a form so
> that they can join our organisation. We'd then like the form the
> details e- mailed to us. Unfortunately we don't have much experience
> in CGI scripts etc and need help.
Ah, you want to learn about CGI programming. You should check the docs,
FAQs, and newsgroups about CGI programming.
> If you think you can help please e-mail us.
Just to be sure, are you asking for free labor? That's not what this
newsgroup is all about. Even if you were building a website that would
save millions of handicapped baby seals of color who are suffering from
AIDS, neglect, and post-nasal drip because their ship was struck by an
iceberg in war-torn Kosovo, this newsgroup isn't really the place to ask
for volunteers. (A better way would be to search out volunteer
organizations through your favorite search engine.)
Even though I personally can't summon much enthusiasm for your cause, I
nevertheless wish you well in your quest. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 11 Jun 1999 00:06:33 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Requesting help in optimizing
Message-Id: <ebohlmanFD4yyx.EKI@netcom.com>
Larry Rosler (lr@hpl.hp.com) wrote:
: { local $/ = "\n[";
: while (<DATA>) {
: chomp; # Strip section-beginning marker
: s/^\s*(#.*)?\n//gm; # Strip blank lines and comment lines
: s/^\s+//gm; # Trim leading space on each line
: s/\s+$//gm; # Trim trailing space on each line
: next unless length; # Just getting started
: s/(.+)]\n// or die "$_: No section name after '['.\n";
Boundary bug. That regex should be "[?(.+)]\n" so that the leading '['
on the very first record (which won't have been chomp()'d off) isn't
taken as part of the section name.
------------------------------
Date: Thu, 10 Jun 1999 15:50:51 -0800
From: Ashish Kadakia <anonymous@web.remarq.com>
Subject: Re: Require "No NT commands" on UNIX
Message-Id: <929058653.22371@www.remarq.com>
Does it mean that there's no way to run unix commands or
programs on unix from NT???
I am very surprised at that..if that's true.
Are we talking about deeply involved RPCs? Are there any
simple interface for that?
I have about 30,000 files, and I know Unix will be able to
handle it very well compared to NT.
How about running a telnet or rlogin ( I will need to know
how to do it though).
Just like uux (unix to unix) are there any command in NT as
ntu ( nt to unix)?
Or when I run the CGI perl-script on unix, it can span
another shell which will call the unix interpreter for the
commands instead of cmd.exe of NT?
Any hint will be useful
Thanks..
ANK
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Thu, 10 Jun 1999 21:32:25 GMT
From: garthwebb@my-deja.com
Subject: Re: Require "No NT commands" on UNIX
Message-Id: <7jpat9$tnh$1@nnrp1.deja.com>
In article <929037819.19863@www.remarq.com>,
Ashish Kadakia <anonymous@web.remarq.com> wrote:
<snip>
> How I can setup in CGI scripts or Perl Enviornment so that
> it will not go to NT for commands and read UNIX commands as
You can't.
Having a mapped drive is much different than being able to
run processes on that particular machine. Your NT webserver receives
a request for a particular CGI which happens to reside on a mapped
drive. It sees that the CGI is a Perl file and runs your local NT
Perl interpreter against the file. Try compiling a native C program
on the Unix side and then running in on your NT machine via the mapped
drive. It will fail since NT will try to run the program, not Unix.
If you have your CGI directory on a Unix machine, why not put your web
server there as well? Your performance will be much better.
Also, why open a pipe to 'date' and suffer portability problems when
Perl already supplies 'localtime' for you? 'localtime' will work the
same way on Unix *and* NT.
Garth
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 10 Jun 1999 16:04:21 -0800
From: Ashish Kadakia <anonymous@web.remarq.com>
Subject: Re: Require "No NT commands" on UNIX
Message-Id: <929059463.22446@www2.remarq.com>
Currently I cannot run web server on that UNIX machine,
also the perticular command that I am looking for
is "gunzip". In future, I may look for some other commands.
language.perl.com/ppt doesn't have gunzip.
ANK
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Thu, 10 Jun 1999 17:17:16 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: DarStec <darstec@aol.com>
Subject: Re: sendmail doesn't work
Message-Id: <3760558C.3198D34A@mail.cor.epa.gov>
[courtesy cc sent to poster]
DarStec wrote:
>
> [snip down to current discussion]
>
> Far too often, when making a snide comment, usenet authors use the ":-)"
> emoticon as a COVER for their criticism and sarcasm. Judging from the
> "attitude" of many regulars of this newsgroup, I chose to interpret this
> instance as such. Look at the sentence and think about it for a minute: "Free
> web server offering CGI... And you bring those troubles here?" In what other
> way can it be interpreted?
As a joke. I thought Tim was quite specifically making a joke
about issues commonly seen with free-server-web-hosting places.
Granted, people in this ng do often take the opportunity to
stick the needle in a bit. Not just to new posters either,
if you take a look at past postings by me, Randal, Uri, Larry
Rosler, ... It's sort of a part of the Perl culture that
programming should be fun, and things should be fun with
good programming tools, instead of the way things run Elsewhere.
> Maybe some Perl and C programmers are so used to using cryptic,
> related-to-nothing shortcuts, instead of real words, that they forget that the
> rest of the world uses actual and many words to convey thoughts.
A lot of the hardcore programmers in this ng do sometimes
forget that the reason people are asking questions is that
the posters *are* new at this. But still, it is not
unreasonable to ask people to 'do their homework before
coming to class', i.e. check the FAQ and follow the frequently-
posted guidelines.
> Free Web Servers are not FREE. Somebody (advertisers) are pay some big bucks
> to the Web Servers. For those that have their web page there it is a concept
> of OPM (Other People's Money) which I am sure is a concept many recognize.
Oh yeah. We see that a *lot* here. People drop by and say:
"Oh, this is probably a FAQ, but I couldn't be bothered to
look, but don't flame me, and when you write the code add
enough error checking, and email it to me because I never
read this group since you're all such a bunch of a$$holes."
It really makes people ready to help the next several posters
with their problems.
> Unfortuately help desks are very sorry for most Web Host Servers that I've run
> across. The customer only paying $100 a month, usually looses out to the
> Fortune 500 company paying tens of thousands of dollars a month. And pray
That's why people are always looking for better web hosts.
Unfortunately. It's also why some of us here try to be helpful
when people ask questions that *obviously* belong in c.i.w.a.g.
or one of the server newsgroups, or even one of the java/
javascript/VB/Tcl newsgroups. Like today, for example.
Granted, not everyone manages to be Miss Sociability on this.
A lot of the long-time Usenetters remember how nice life was
before September 1993 and AOhelL, when it was feasible to
explain usenet and Nettiquette to each newbie who committed
an offense. But:
> tell, how can a newbie tell whether the problem is in the Perl code or Server
> related, or even a particular interpretation of the Perl code on that server?
That's the crux of the biscuit. Many don't know there *is* a
difference between HTML and CGI and Perl. Which is why there
is so much in perlfaq9 that is in fact off-topic. Those are
questions and answers there to help others. And some of us
*do* try to be [reasonably] polite and helpful, even if that
help encourages someone to learn how to look up answers, rather
than spoon-feeding them one answer so they have to come back
here for answers #2, 3, 4, 5, ..., 77, ...
In some cases, there is no way of telling what the problem is
without seeing the offending piece of the code, plus server
and software info. And if the experts require that, then
all a newbie can do is trust that the experts know how to do
this, and follow their guidance.. which includes following
the guidelines for this newsgroup.
If I haven't argued this into enough circularity, let me
know. I'll be a_round. :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 10 Jun 1999 20:24:59 -0400
From: Kiriakos Georgiou <kgnews@olympiakos.com>
Subject: shortest self printing perl program
Message-Id: <87iu8vd1no.fsf@gate7.olympiakos.com>
OK, since I am in quiz mode today, can someone come up
with a shorter program that prints itself without opening
any files, spawning processes etc. than this one-liner:
printf($x,39,$x='printf($x,39,$x=%c%s%c,39);',39);
--
Kiriakos Georgiou
------------------------------
Date: Thu, 10 Jun 1999 21:10:02 GMT
From: dhosek@quixote.com
Subject: Re: Signal/sleep hidden interaction?
Message-Id: <7jp9j1$t4l$1@nnrp1.deja.com>
In article <FD1JuJ.Fo7@news.boeing.com>,
ced@bcstec.ca.boeing.com (Charles DeRykus) wrote:
> Strange. What OS? How do you daemonize and what does
> the SIGHUP handler look like? That may provide some
> needed clues.
My daemonization and sighup handler are straight out of the perl
cookbook with insignificant modifications (e.g., exec($SELF) instead of
exec($SELF,@ARGS)).
I've actually come up with a better diagnosis of what's going on: The
sighup works the first time, but the second time it doesn't respond to
any signal but kill -9 (and yes, I'm using the correct pid).
-dh
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 10 Jun 1999 17:00:34 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Taking a Poll.....
Message-Id: <MPG.11c9f1811bf7041b989bba@nntp.hpl.hp.com>
In article <376037a6.1308745156@news.qgraph.com> on Thu, 10 Jun 1999
22:10:03 GMT, Darren Greer <drgreer@qtiworld.com> says...
> www.oreilly.com
>
> And buy Learning Perl (Second Edition).
>
> On Thu, 10 Jun 1999 17:00:31 -0500, rkidd@luc.edu wrote:
>
> -->and I need your assistance. I plan on teaching myself Perl but I don't
> -->know which book to use. If you have and suggestions please email me at
> -->rkidd@luc.edu. Thank you. By the way I am a CS major with a background
> -->in C++.
Then you might enjoy "Perl: The Programmer's Companion" even more.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 10 Jun 1999 17:04:37 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Taking a Poll.....
Message-Id: <Pine.GSO.4.02A.9906101704150.26349-100000@user2.teleport.com>
On Thu, 10 Jun 1999 rkidd@luc.edu wrote:
> I don't know which book
See the FAQ about this. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
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 5954
**************************************