[9478] in Perl-Users-Digest
Perl-Users Digest, Issue: 3074 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 6 21:17:52 1998
Date: Mon, 6 Jul 98 18:09:26 -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 Mon, 6 Jul 1998 Volume: 8 Number: 3074
Today's topics:
s/,/','/; <rick@netxp.com>
Re: s/,/','/; (brian d foy)
Screen Output on Win32/NT4 <tomm@aura.co.uk>
Re: Screen Output on Win32/NT4 <chris.wareham@blackwell.co.uk>
Serial Port problems... zibblepies@my-dejanews.com
Re: setting directory permissions... <heribert.wettels@sueddeutsche.de>
single-user access to html files (w3c) <i.m.hay@man0524.wins.icl.co.uk>
Re: So, what's wrong with JAVA? <jdporter@min.net>
SQL and apostrophe <mon008m1@monselice.nettuno.it>
Re: SQL and apostrophe (brian d foy)
Stop Button <dnp@ams.org>
Re: Stop Button (brian d foy)
Re: Stop Button (Abigail)
Re: subtle variations of 'print (&&|and) die;' <dgris@rand.dimensional.com>
Re: subtle variations of 'print (&&|and) die;' <danboo@negia.net>
system commands in perl (EXCHANGE:CAR:9L23)
Re: system commands in perl <quednauf@nortel.co.uk>
Re: system commands in perl (Craig Berry)
Re: system commands in perl (Marc Haber)
taking in values from a form <howard@vortexweb.com>
Re: taking in values from a form <quednauf@nortel.co.uk>
Re: Testing perl knowledge (Yun Giljung)
Text::Boilerplate? kceF95@hamp.hampshire.edu
Re: Text::Boilerplate? <zenin@bawdycaste.org>
use strict; <kimplera@med.unc.edu>
Re: Using goto & with SUPER:: <jdporter@min.net>
Using Perl mirror script hpven@hotmail.com
Re: Using Perl mirror script <jdf@pobox.com>
Re: Using Perl mirror script (Jeremy D. Zawodny)
Using the Standard Modules? (Burt Lewis)
Re: Using the Standard Modules? (Richard Bellavance)
Re: Virtual functions. <jdporter@min.net>
Re: Virtual functions. <jdporter@min.net>
What are "callbacks"? <NOSPAMkEynOn@panix.comNOSPAM>
Re: What are "callbacks"? (Craig Berry)
Where can I find perl for win95...how do I use it with <poohba@io.com>
Re: Where can I find perl for win95...how do I use it w <dtbaker_@flash.net>
Re: while (<CSV_FILE>) doesn't work with NT (Martien Verbruggen)
Re: Why no Perl news/mailreader? (Sitaram Chamarty)
Re: Why no Perl news/mailreader? <roberto@eurocontrol.fr>
why won't my compare work <howard@vortexweb.com>
Re: why won't my compare work (Michael Budash)
WIN32 - add icon in perl <dennis.kowalski@daytonoh.ncr.com>
Re: WIN32 - add icon in perl <quednauf@nortel.co.uk>
Win32 Service Running? <ken.chesak@dhs.state.tx.us>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 06 Jul 1998 20:39:37 -0700
From: Rick Stidham <rick@netxp.com>
Subject: s/,/','/;
Message-Id: <35A19879.95F6443C@netxp.com>
Help!! I'm trying to replace a
comma
with
apostrophe comma apostrophe
with the following command
s/,/','/;
and no matter what combination of single quotes, double quotes,
brackets, etc., I try to use, it only replaces the comma with two
apostrophes and won't put the comma between them. I assume it's
interpreting the comma as a list delimiter or something.
This must be something simple.
Please help!!
Thanks.
------------------------------
Date: Mon, 06 Jul 1998 20:56:06 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: s/,/','/;
Message-Id: <comdog-ya02408000R0607982056060001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35A19879.95F6443C@netxp.com>, Rick Stidham <rick@netxp.com> posted:
>Help!! I'm trying to replace a
>comma
>with
>apostrophe comma apostrophe
>s/,/','/;
>
>and no matter what combination of single quotes, double quotes,
>brackets, etc., I try to use, it only replaces the comma with two
>apostrophes and won't put the comma between them. I assume it's
>interpreting the comma as a list delimiter or something.
works for me:
#!/usr/bin/perl
$_ = "dogs, cats";
s/,/','/;
print;
__END__
dogs',' cats
are you sure there isn't another problem in your code? which
version of Perl are you using?
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: Mon, 06 Jul 1998 11:59:48 +0100
From: Tom McDonnell <tomm@aura.co.uk>
Subject: Screen Output on Win32/NT4
Message-Id: <35A0AE24.354E@aura.co.uk>
I'm invoking a command line application from a Perl script which doesn't
seem to write all of it's output to STDOUT therefore I can't read it
into Perl (or even do application.exe > test.txt or application.exe |
more). It doesn't matter how I run the program (system(), backquotes or
as a pipe to a filehandle).
I therefore need to trap it's screen output somehow - has anyone any
ideas? Bear in mind it's Win32/NT.
thanks in advance,
Tom McDonnell
------------------------------
Date: Mon, 06 Jul 1998 13:15:17 GMT
From: Chris Wareham <chris.wareham@blackwell.co.uk>
Subject: Re: Screen Output on Win32/NT4
Message-Id: <35A0CE7B.E87E03A9@blackwell.co.uk>
Tom McDonnell wrote:
>
> I'm invoking a command line application from a Perl script which doesn't
> seem to write all of it's output to STDOUT therefore I can't read it
> into Perl (or even do application.exe > test.txt or application.exe |
> more). It doesn't matter how I run the program (system(), backquotes or
> as a pipe to a filehandle).
>
> I therefore need to trap it's screen output somehow - has anyone any
> ideas? Bear in mind it's Win32/NT.
>
Does Win32/NT have a STDERR file stream? if so, try:
my $retval = system("application.exe > output.txt 2>&1");
This might be too ``Unix'' for NT, but you never know ...
Chris
--
chris.wareham@blackwell.co.uk
+44 (0)1865 792792 ext. 3381
------------------------------
Date: Mon, 06 Jul 1998 23:19:22 GMT
From: zibblepies@my-dejanews.com
Subject: Serial Port problems...
Message-Id: <6nrm1q$bp9$1@nnrp1.dejanews.com>
I'm having problems getting a serial port to respond.
Bascially, I've got a modem eliminator cable going from one machine to
another. One machine is running linux, the other is running DOS... On the
DOS machine is a simple basic program that opens up its com port, reads looks
for a carriage return, and if it gets one it'll send a page of text.
Eventually this will be a more advanced program, but we're just working on a
prototype for example purposes.
On the linux machine, I've got a perl script that looks like this:
#!/usr/bin/perl
open(DEV, "+</dev/ttyS1") || die $!;
select((select(DEV), $| = 1)[0]);
print DEV "\r\n";
while (<DEV>) {
last if ($_ eq "");
print "$_";
}
close(DEV);
-----
Now, a few questions.
Does anyone offhand know the name of the lock files for a serial port under
linux?
Also, whenever the program was ran, the DOS-based program would either get an
ascii character it didn't see as a carriage return, or if I put more than just
that "\r\n" in as the string sent to the DOS machine, it would give me a I/O
error.
The DOS program is running with the com port open as 2400 baud, 8N1 parity.
I've read the FAQ that had the section about serial ports. What am I doing
wrong, here? How do I set the baud rate and parity of a serial port? Are
there any other obvious things I'm missing?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Fri, 03 Jul 1998 13:08:35 +0200
From: Heribert Wettels <heribert.wettels@sueddeutsche.de>
Subject: Re: setting directory permissions...
Message-Id: <359CBBB3.1A901C5E@sueddeutsche.de>
How about the following:
system ("mkdir $directory\n");
system ("chmod 0700 $directory\n");
Maybe not as elegant, but it works,
Heribert
Ric Alcazar wrote:
> Hello all,
>
> when I create a new directory:
>
> mkdir($directory, $permissions);
>
> and try to set the permissions... it never gets set correctly...
> sometimes I try to set $permissions = '0700', but that doesn't seem to
> work... instead... I get a different permissions assigned... can anyone
> help?
>
> Ric
------------------------------
Date: Mon, 06 Jul 1998 14:47:02 GMT
From: "I.M.Hay" <i.m.hay@man0524.wins.icl.co.uk>
Subject: single-user access to html files (w3c)
Message-Id: <01bda8ec$b0267320$6ec3e391@imp46.wg.icl.co.uk>
This is more CGI than perl - I suspect the web server may be the answer:
I have a directory of html files that are to do with an internet
application. Because of what the applicaation does I need it to be
single-user access. The application is perl scripts which output existing
and generated html pages.
I currently have the directory containing the existing html
password-protected using htadm (CERN/w3c web server) - how can I get it to
restrict access to single user?
Thanks,
Isabel.
------------------------------
Date: Mon, 06 Jul 1998 14:39:09 GMT
From: John Porter <jdporter@min.net>
Subject: Re: So, what's wrong with JAVA?
Message-Id: <35A0E367.987@min.net>
Jeffery Cann wrote:
>
> My point is that there is not one language that can 'do everything' (although I think perl
> comes as close as anything for an interpreted language).
Forgive me if I seem to be hyper-sensitive, but...
It sounds like you're saying that interpreted languages are at a
natural disadvantage relative to compiled languages, in terms of
what they can do. I suggest that you have it exactly backwards.
There are things that interpreted langauges (such as perl) can
do, by virtue of being dynamic, that compiled languages can never
hope to do. How do you do an 'eval' in C? How do you modify a
class's inheritance tree at run-time, in C++?
--
John Porter
------------------------------
Date: Mon, 06 Jul 1998 18:19:07 +0200
From: pc01 <mon008m1@monselice.nettuno.it>
Subject: SQL and apostrophe
Message-Id: <35A0F8FA.B3D211BA@monselice.nettuno.it>
Hi to everybody,
I'm using the Perl module Win32::ODBC on an NT 4 server to update an MS
Access 97 database from Web. When one field of the record inserted
contains an apostrophe I get an "SQL failed" Error, so I should find a
method to get harmless this apostrophe and to insert it in the database
all the same.
Any suggestion?
Thank you for your attention.
Massimo Seren - Euganea Telematic@
------------------------------
Date: Mon, 06 Jul 1998 14:05:20 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: SQL and apostrophe
Message-Id: <comdog-ya02408000R0607981405200001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35A0F8FA.B3D211BA@monselice.nettuno.it>, pc01 <mon008m1@monselice.nettuno.it> posted:
>I'm using the Perl module Win32::ODBC on an NT 4 server to update an MS
>Access 97 database from Web. When one field of the record inserted
>contains an apostrophe I get an "SQL failed" Error, so I should find a
>method to get harmless this apostrophe and to insert it in the database
>all the same.
>Any suggestion?
escape special characters. perhaps Win32::ODBC already has a method
to help yuo with this.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: Mon, 6 Jul 1998 16:30:47 -0400
From: "Dan Pelton" <dnp@ams.org>
Subject: Stop Button
Message-Id: <6nrc67$5s2$1@newsreader.jvnc.net>
Does the Netscape server send any kind of signal to its child cgi process
when a client hits the stop button after submitting an html form?
If so, my server does not seem to be sending the signal. Is this
configurable in the server?
thanks,
Dan Pelton (dnp@ams.org)
------------------------------
Date: Mon, 06 Jul 1998 16:46:58 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Stop Button
Message-Id: <comdog-ya02408000R0607981646580001@news.panix.com>
Keywords: from just another new york perl hacker
[follow-ups set]
In article <6nrc67$5s2$1@newsreader.jvnc.net>, "Dan Pelton" <dnp@ams.org> posted:
>Does the Netscape server send any kind of signal to its child cgi process
>when a client hits the stop button after submitting an html form?
once the response is sent, the client isn't required to continue
talking to the server. you might get a broken pipe or an error
when trying to print to a closed filehandle, but that's not on
HTTP or Perl issue.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: 6 Jul 1998 23:13:26 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Stop Button
Message-Id: <6nrlmm$rhd$4@client3.news.psi.net>
Dan Pelton (dnp@ams.org) wrote on MDCCLXX September MCMXCIII in
<URL: news:6nrc67$5s2$1@newsreader.jvnc.net>:
++ Does the Netscape server send any kind of signal to its child cgi process
++ when a client hits the stop button after submitting an html form?
You mean, the Netscape server has ESP? Think about it, how should the
server know what the client did?
++ If so, my server does not seem to be sending the signal. Is this
++ configurable in the server?
What has this to do with Perl or perl? Try Netscape techsupport.
Abigail
--
perl -we '$_ = q ?4a75737420616e6f74686572205065726c204861636b65720as?;??;
for (??;(??)x??;??)
{??;s;(..)s?;qq ?print chr 0x$1 and \161 ss?;excess;??}'
------------------------------
Date: Mon, 06 Jul 1998 02:14:24 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: subtle variations of 'print (&&|and) die;'
Message-Id: <6npbb8$nk0$1@rand.dimensional.com>
[posted and mailed to the cited author]
In article <35A029D9.A6D93629@negia.net>
Dan Boorstein <danboo@negia.net> wrote:
>my guess would have been that they all print 'money' to STDOUT
>(and that it would actually appear on screen) before dying.
>one version does not. can you guess which one?
On my box none of them print 'money' before C<die>ing unless
I set $| first. But I think the one you are surprised about
is this-
>print 'money' && die 'in jail';
>__END__
The precedence of && is higher than that of print LIST. It
is as if you had written-
print('money' && die 'in jail');
which obviously won't work :-).
HTH,
Daniel
--
Daniel Grisinger dgris@perrin.dimensional.com
"No kings, no presidents, just a rough consensus and
running code."
Dave Clark
------------------------------
Date: Sun, 05 Jul 1998 22:20:40 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: subtle variations of 'print (&&|and) die;'
Message-Id: <35A03478.BDD70742@negia.net>
Daniel Grisinger wrote:
>
> [posted and mailed to the cited author]
> In article <35A029D9.A6D93629@negia.net>
> Dan Boorstein <danboo@negia.net> wrote:
>
> >print 'money' && die 'in jail';
> >__END__
>
> The precedence of && is higher than that of print LIST. It
> is as if you had written-
> print('money' && die 'in jail');
> which obviously won't work :-).
yes, how very silly of me. :-(
--
Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
- Cosmic AC
------------------------------
Date: Mon, 06 Jul 1998 11:17:02 -0400
From: "Frenette, Neil (EXCHANGE:CAR:9L23)" <nfrenett@americasm01.nt.com>
Subject: system commands in perl
Message-Id: <35A0EA6E.2156ED36@americasm01.nt.com>
Is there a way to capture the output of a unix command when
you execute it from a perl script using the system(" ") command ????
Neil Frenette
Nortel
nfrenett@nortel.ca
------------------------------
Date: Mon, 06 Jul 1998 16:28:00 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: system commands in perl
Message-Id: <35A0ED00.A1B438AD@nortel.co.uk>
Frenette, Neil (EXCHANGE:CAR:9L23) wrote:
>
> Is there a way to capture the output of a unix command when
> you execute it from a perl script using the system(" ") command ????
>
Not that I would know of, but that's why the backticks are around, I suppose:
$arg = `ls`;
print $arg;
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 6 Jul 1998 16:44:03 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: system commands in perl
Message-Id: <6nqusj$e25$1@marina.cinenet.net>
Frenette, Neil (EXCHANGE:CAR:9L23) (nfrenett@americasm01.nt.com) wrote:
: Is there a way to capture the output of a unix command when
: you execute it from a perl script using the system(" ") command ????
Not directly, no. If you want the output, use backticks `` instead.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Mon, 06 Jul 1998 19:32:52 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: system commands in perl
Message-Id: <6nr8q6$7pv$1@nz12.rz.uni-karlsruhe.de>
"Frenette, Neil (EXCHANGE:CAR:9L23)" <nfrenett@americasm01.nt.com>
wrote:
>Is there a way to capture the output of a unix command when
>you execute it from a perl script using the system(" ") command ????
You might want to read the docs, especially perldoc -f open.
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: Mon, 6 Jul 1998 10:10:26 -0500
From: "Howard Dierking" <howard@vortexweb.com>
Subject: taking in values from a form
Message-Id: <upSRH9Oq9GA.259@upnetnews05>
when a form returns the query string to my perl app, does it just retun
those fields that have a value? I guess my real question is, is there a way
for me to determine if or if not a check box was checked?
------------------------------
Date: Mon, 06 Jul 1998 16:24:17 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: taking in values from a form
Message-Id: <35A0EC21.2A0D7624@nortel.co.uk>
Howard Dierking wrote:
>
> when a form returns the query string to my perl app, does it just retun
> those fields that have a value? I guess my real question is, is there a way
> for me to determine if or if not a check box was checked?
alt.perl - Did you know that alt stands for 'old' in German?
this isn't really Perl, but apart from that: Isn't there a flaw in your logic?
If a checkbox is checked, then it certainly will be returned, as it has got a
value!
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 06 Jul 1998 12:46:30 GMT
From: mingtian@hanmail.net (Yun Giljung)
Subject: Re: Testing perl knowledge
Message-Id: <35978721.44339828@usenet.kornet21.net>
Tom Christiansen <tchrist@mox.perl.com> wrote:
>========================================================================
>
>Question: How do you match one letter in the current locale?
>Type: Regular Expressions
>Difficulty: 4/7 (Medium)
..
>Answer: /[^\W_\d]
>Correct: Yes.
>Why: We don't have full POSIX regexps, so you can't get at
> the isalpha() <ctype.h> macro save indirectly. You ask
> for one byte which is neither a non-alphanumunder, nor
> an under, nor a numeric. That leaves just the alphas,
> which is what you want.
one byte,
i don't think this can match one letter of Korean or Chinese of two byte.
------------------------------
Date: Mon, 06 Jul 1998 21:20:18 GMT
From: kceF95@hamp.hampshire.edu
Subject: Text::Boilerplate?
Message-Id: <6nrf2i$v8b$1@nnrp1.dejanews.com>
Hello, I've written a templating system built on top of the module
Text::BoilerPlate, but I've tried to find a more recent version and I am a
little alarmed to find that the website where I downloaded it from doesn't
exist, and when I tried to send email to the author the email was bounced back
with "host unknown".
So my question is, is anyone using this module? Is there a reason its not
being used? Does anyone know if there is a recent release?
Thank you
Kellan
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 6 Jul 1998 22:08:38 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Text::Boilerplate?
Message-Id: <899763462.697872@thrush.omix.com>
kceF95@hamp.hampshire.edu wrote:
: Hello, I've written a templating system built on top of the module
: Text::BoilerPlate, but I've tried to find a more recent version and I am a
: little alarmed to find that the website where I downloaded it from doesn't
: exist, and when I tried to send email to the author the email was bounced back
: with "host unknown".
This is one of the great many reasons nearly all publicly available
Perl modules are published to CPAN.
: So my question is, is anyone using this module?
Well, you are, and that's all that really means anything in this
case.
: Is there a reason its not being used?
Not sure. What does it do? -There may well be a Better Way[tm]
available now that wasn't when it was created.
: Does anyone know if there is a recent release?
Not at CPAN. I'd check the web search engines.
--
-Zenin
zenin@archive.rhps.org
------------------------------
Date: Mon, 06 Jul 1998 09:20:03 -0400
From: Randy Kimple <kimplera@med.unc.edu>
Subject: use strict;
Message-Id: <35A0CF03.3ED81CC3@med.unc.edu>
I'm using Activestate build 316 and when I include use strict in my code
I get the following error for the code:
#!/user/bin/perl -w
use strict;
syntax error in file makefr~1.txt at line 2, next 2 tokens "use strict"
Execution of makefr~1.txt aborted due to compliation errors.
I'm new at this but have been running around in circles trying to fix
this.
Thanks for the help.
Randy
------------------------------
Date: Mon, 06 Jul 1998 14:12:46 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Using goto & with SUPER::
Message-Id: <35A0DD38.3F9A@min.net>
Charles DeRykus wrote:
>
> $mref = sub { $class->SUPER::new(@_) };
> goto &$mref;
But that has the same effect as, at higher cost than:
$class->SUPER::new(@_);
--
John Porter
------------------------------
Date: 6 Jul 1998 14:27:37 GMT
From: hpven@hotmail.com
Subject: Using Perl mirror script
Message-Id: <6nqmsp$og0$1@orthanc.reference.com>
I'm triying to use the perl script to setup a mirror and i got a few questions:
Why if i run this with the default parameters, doesnt work, after pressing the button the command seems to work but then stops, do i need other script or software to put it to work.
I'm using perl 5 it will work fine.
Where can i get examples to setup this seems-to-be wonderful script.
Thnks again.
--------------------------------------------------------------------
Posted using Reference.COM http://WWW.Reference.COM
FREE Usenet and Mailing list archive, directory and clipping service
--------------------------------------------------------------------
------------------------------
Date: 06 Jul 1998 14:02:58 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: hpven@hotmail.com
Subject: Re: Using Perl mirror script
Message-Id: <u34un6ot.fsf@mailhost.panix.com>
hpven@hotmail.com writes:
> Where can i get examples to setup this seems-to-be wonderful script.
This newsgroup is really for folks who are using the Perl language,
and not for folks who need to use an application written in Perl. If
you're having trouble understanding the source code, and you've read
the documentation that accompanies perl, and you still can't figure it
out, then please do post a short example of the code that's giving you
a hard time.
> Thnks again.
Dn't mntn t.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf/
------------------------------
Date: 06 Jul 1998 20:04:58 -0400
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Using Perl mirror script
Message-Id: <m34swu5xw5.fsf@peach.z.org>
hpven@hotmail.com writes:
> I'm triying to use the perl script to setup a mirror and i got a few
> questions:
"the perl script" Which Perl script? There are many?
Are you doing FTP mirroring? HTTP mirroring?
> Why if i run this with the default parameters, doesnt work, after
> pressing the button the command seems to work but then stops, do i
> need other script or software to put it to work.
What button?
> I'm using perl 5 it will work fine.
If it works fine, what are you asking?
> Where can i get examples to setup this seems-to-be wonderful script.
Again, what script?
Jeremy
--
Jeremy D. Zawodny Web Geek, Perl Hacker, etc.
http://www.wcnet.org/~jzawodn/ jzawodn@wcnet.org
LOAD "LINUX",8,1
------------------------------
Date: 6 Jul 1998 15:57:38 GMT
From: burt@ici.net (Burt Lewis)
Subject: Using the Standard Modules?
Message-Id: <6nqs5i$8ja$1@bashir.ici.net>
Hi,
I'm looking for documentation and examples on using the modules included
with Unix Perl.
Specificaly, I would like to understand more about:
use Net::NNTP
Appreciation a lead on where the detail is. The manpage for perlmodlib does
not give examples.
Thank you!
Burt Lewis
------------------------------
Date: 6 Jul 1998 12:43:04 -0400
From: charlot@CAM.ORG (Richard Bellavance)
Subject: Re: Using the Standard Modules?
Message-Id: <6nquqo$86a@stratus.CAM.ORG>
In article <6nqs5i$8ja$1@bashir.ici.net>, Burt Lewis <burt@ici.net> wrote:
>
>Specificaly, I would like to understand more about:
>
>use Net::NNTP
>
>Appreciation a lead on where the detail is. The manpage for perlmodlib does
>not give examples.
>
Try the manpage for Net::NNTP ! "perldoc Net::NNTP" should do it.
Hope this helps,
Richard.
--
Richard Bellavance |
| "Rien n'est plus imminent que l'impossible."
charlot@cam.org | - Victor Hugo
http://www.cam.org/~charlot/ |
------------------------------
Date: Mon, 06 Jul 1998 13:54:44 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Virtual functions.
Message-Id: <35A0D8FD.1638@min.net>
Kevin Reid wrote:
>
> package AClass;
>
> sub new {
> my ($class, $path) = @_;
>
> die 'I'm virtual!' if $class eq 'AClass';
>
> bless {
> path => $path,
> }, $class;
> }
Exactly right.
--
John Porter
------------------------------
Date: Mon, 06 Jul 1998 13:56:32 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Virtual functions.
Message-Id: <35A0D969.345F@min.net>
Igor Krivokon wrote:
>
> John Porter wrote in message <359BA2D7.6A0C@min.net>...
> >If you really want to catch that kind of error as early as possible,
> >then maybe you can arrange to have your objects instantiated in
> >BEGIN blocks.
>
> That's too tricky, IMHO.
Yep. I wasn't recommending it, just pointing out the possibility.
> I don't really think Perl needs pure virtual functions in C++ sense -
> Perl's OO has its own approach.
That's exactly my point. Perl isn't C++.
--
John Porter
------------------------------
Date: 6 Jul 1998 17:37:30 GMT
From: k y n n <NOSPAMkEynOn@panix.comNOSPAM>
Subject: What are "callbacks"?
Message-Id: <6nr20q$r3t@news1.panix.com>
What are "callbacks"? I keep running into the term but I haven't been
able to find a definition.
Thanks in advance,
K.
--
To those who prefer to reply by e-mail, please remove the upper-case
letters from the return address in the header. Thank you. K.
------------------------------
Date: 6 Jul 1998 17:49:40 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: What are "callbacks"?
Message-Id: <6nr2nk$hus$1@marina.cinenet.net>
k y n n (NOSPAMkEynOn@panix.comNOSPAM) wrote:
: What are "callbacks"? I keep running into the term but I haven't been
: able to find a definition.
A programming idiom wherein a resource accepts from calling code
references to functions to be called when some resource event occurs. The
function passed in, which is called by the resource when the event occurs,
is often refered to as a 'callback', as are the process of calling the
function, and the overall design model.
An example might be a GUI interface which would allow creation of an
onscreen widget; the call to create the widget would include a function
reference which would then be called whenever GUI events affecting the
widget occurred.
Object-oriented designs often hide the existence of callbacks 'under the
covers,' as the data associated with a resource is tightly coupled to the
methods of that resource.
Hope this helps!
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Mon, 6 Jul 1998 13:46:56 -0500
From: Chocolate <poohba@io.com>
Subject: Where can I find perl for win95...how do I use it with local web pages?
Message-Id: <Pine.BSI.3.96.980706134455.357A-100000@pentagon.io.com>
Can someone please tell me where to find perl for win95? Could you also
tell me how to reference it when creating local web pages?
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/_/ _/ _/
_/ _/ _/ _/
Web Page Designs _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/
Small Programs _/ _/ / _/ _/ _/ _/ _/ _/ _/ _/ poohba@io.com
www.io.com/~poohba _/ _/_/_/ _/_/_/ _/ _/ _/_/_/ _/_/\_ (919)506-5883
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
------------------------------
Date: Mon, 06 Jul 1998 14:04:33 -0500
From: Dan Baker <dtbaker_@flash.net>
Subject: Re: Where can I find perl for win95...how do I use it with local web pages?
Message-Id: <35A11FC1.357D@flash.net>
Chocolate wrote:
>
> Can someone please tell me where to find perl for win95? Could you also
> tell me how to reference it when creating local web pages?
------------
Q: Are there any tricks to installing Perl in win32?
A: well, there are a few things to watch out for:
- extract the .zip to any temp directory, it will expand everything
including a bunch of patches and stuff you don't need and can delete
later.
- when you install, specifiy the directory as c:\usr\local so that you
can use the standard UNIX #!/usr/bin/perl header in your programs to
find perl. The install.bat file will create dirs and install things in
the right place...
- The directory where perl.exe is installed has to be in your path
statement in your autoexec.bat The install script talks about being able
to set your path via an environment tab in your ControlPanels->System,
but this does not exist on some windows95. You can edit your
autoexec.bat with the sysedit tool, and insert a line giving the path to
the perl.exe file like:
path %path%;.;C:\usr\bin;
- You have to manually associate *.pl files to execute Perl. Under
"windows explorer" select VIEW and then OPTIONS and add a file type .pl
to exec c:\usr\bin\perl.exe when double-clicked. this is a great way to
avoid the ugly DOS window completely. It does present a few other issues
though; the system doesn't know what to open a *.pl file with to edit,
and the STDOUT still goes to a DOS window which just blinks and is
gone.... Here is how to fix these:
- create a shortcut to notepad.exe or the editor of your choice in the
c:\windows\SendTo folder. This will allow you to select a perl source
file from an explorer window, and open with the editor. You may also
want to create a shortcut to wordpad.exe or some other editor that does
simple search/replace or spell checking.
- you won't be able to see STDOUT in a DOS window, but if you open a
filehandle for a log or message to the user, especially during testing,
you can open the file and display by using a line like this:
system ('c:\\windows\\notepad.exe output.txt');
- don't forget to go back and delete the temporary source installation
directory.
Q: what version of perl do I need to run on win95, and where do I get
it?
A: At the time this was written v5.004_04 was the latest version
available. you can check out http://www.perl.com/latest.html for more
current information. You will find it easiest to unzip the download that
ends in *.zip if you already have winzip, or some other zip utility. The
GS version is at
http://www.perl.com/CPAN-local/ports/win32/Standard/x86/
------------------------------
Date: 2 Jul 1998 23:08:10 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: while (<CSV_FILE>) doesn't work with NT
Message-Id: <6nh3sq$nb9$1@comdyn.comdyn.com.au>
In article <6nesqm$ckb@beast.connix.com>,
insider@comet.connix.com (Stephen L. Vinson) writes:
>: -> $basedir = "/~steve";
>: -> $datafile = "phonelist.csv";
>: ->
>: -> open(PHONE_LIST,"$basedir/$datafile");
You can't use shell metacharacters like ~ in there. You might try
using environment variables, getpwuid, or something like that to
figure out the home directory of steve. Otherwise you'll just have to
use the real path.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | If at first you don't succeed, try
Commercial Dynamics Pty. Ltd. | again. Then quit; there's no use being
NSW, Australia | a damn fool about it.
------------------------------
Date: 6 Jul 98 04:25:02 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Why no Perl news/mailreader?
Message-Id: <slrn6q0k39.kk7.sitaram@ltusitaram.diac.com>
On Mon, 6 Jul 1998 01:46:15 +0100, Russell Schulz
<Russell_Schulz@locutus.ofB.ORG> wrote:
>the Subject: header makes an invalid assumption; I know of at least
>two newsreaders written in perl.
Also, what is pnews? Tom C uses that, and I believe it is a
newsreader written in Perl...(mental note to self: look it up)
------------------------------
Date: 6 Jul 1998 14:22:57 GMT
From: Ollivier Robert <roberto@eurocontrol.fr>
Subject: Re: Why no Perl news/mailreader?
Message-Id: <6nqmk1$hjf$3@polaris.eurocontrol.fr>
[courtesy cc of this posting sent to cited author via email]
In article <slrn6q0k39.kk7.sitaram@ltusitaram.diac.com>,
Sitaram Chamarty <sitaram@diac.com> wrote:
> Also, what is pnews? Tom C uses that, and I believe it is a
> newsreader written in Perl...(mental note to self: look it up)
Pnews is the actual posting agent in trn. It is a shell script although Tom
probably has a Perl version somewhere.
--
Ollivier ROBERT -=- Eurocontrol EEC/TS -=- Ollivier.Robert@eurocontrol.fr
Usenet Canal Historique FreeBSD: The Power to Serve!
------------------------------
Date: Sun, 5 Jul 1998 23:28:33 -0500
From: "Howard Dierking" <howard@vortexweb.com>
Subject: why won't my compare work
Message-Id: <ud9IdWJq9GA.259@upnetnews03>
I am reading from a an outside file which contains a list of identifiers and
locations
(example)
beta
http://www.url.com/file.html
I haven't had a problem opening the file (at least I'm not getting an
error), but no matter what, my $redirect_loc variable always ends up being
the "wrong_id.html" string. The code is posted below. Any reason why?
Thanks.
howard
-------------------
#!/usr/bin/perl -w
#
# validateid.pl
$redirect_loc = "http://www.eventresponse.com/wrong_id.html"; #initialize
variables
print "Please enter the file handle: ";
$reg_key = <STDIN>;
open (LIST, "list.dat"); # open the data file
while (defined ($line = <LIST>)){
chomp ($line);
if ($line eq $reg_key){
$line = <LIST>;
chomp ($line);
$redirect_loc = $line;
}
else{
$line = <LIST>;
chomp($line);
}
}
close (LIST);
print "the address will be: $redirect_loc\n";
------------------------------
Date: Mon, 06 Jul 1998 01:37:00 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: why won't my compare work
Message-Id: <mbudash-0607980137000001@209.204.139.53>
In article <ud9IdWJq9GA.259@upnetnews03>, "Howard Dierking"
<howard@vortexweb.com> wrote:
>> I am reading from a an outside file which contains a list of identifiers and
>> locations
>>
>> (example)
>> beta
>> http://www.url.com/file.html
>>
>> I haven't had a problem opening the file (at least I'm not getting an
>> error), but no matter what, my $redirect_loc variable always ends up being
>> the "wrong_id.html" string. The code is posted below. Any reason why?
>> Thanks.
>>
>> howard
[code snipped]
try a:
chomp($reg_key);
right after:
$reg_key = <STDIN>;
or just replace both lines with:
chomp($reg_key = <STDIN>);
hth -
--
Michael Budash, Owner * Michael Budash Consulting
707-255-5371 * 707-258-7800 x7736
mbudash@sonic.net
------------------------------
Date: Mon, 06 Jul 1998 11:11:22 -0400
From: Dennis Kowalski <dennis.kowalski@daytonoh.ncr.com>
Subject: WIN32 - add icon in perl
Message-Id: <35A0E91A.509A@daytonoh.ncr.com>
Is there a way to create icons on the desktop or in the statup group
from withing a perl script ??
------------------------------
Date: Mon, 06 Jul 1998 16:31:20 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: WIN32 - add icon in perl
Message-Id: <35A0EDC8.92F8F7FC@nortel.co.uk>
Dennis Kowalski wrote:
>
> Is there a way to create icons on the desktop or in the statup group
> from withing a perl script ??
There is a module that does just that, it should be somewhere on CPAN, but I
can't find it right now...
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 06 Jul 1998 14:17:18 -0500
From: Ken Chesak <ken.chesak@dhs.state.tx.us>
Subject: Win32 Service Running?
Message-Id: <35A122BE.47A7FF9E@dhs.state.tx.us>
How do a check to see if a service is running on NT using PerlWin32
version 5.00402?
Thank
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 3074
**************************************