[16406] in Perl-Users-Digest
Perl-Users Digest, Issue: 3818 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 27 06:05:34 2000
Date: Thu, 27 Jul 2000 03:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <964692309-v9-i3818@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 27 Jul 2000 Volume: 9 Number: 3818
Today's topics:
Re: Advanced Perl Programming -- Dated? <bill.kemp@wire2.com>
Re: Custom mail headers with perl (Gwyn Judd)
difference between require $file and require Module astewart@spawar.navy.mil
Re: difference between two times in seconds (Abigail)
Re: difference between two times in seconds (Abigail)
Re: difference between two times in seconds (Bernard El-Hagin)
Re: Do I Need Chomp? <was Critiques, please> <bart.lateur@skynet.be>
Re: Does anybody know how to use ptkdbw? <jouke@nedstat.nl>
Re: Error msg for perl using DBI?? <gellyfish@gellyfish.com>
Expanding lists of ranges of integers 1-3,5-8,9,13-14 <monty@primenet.com>
Re: Expanding lists of ranges of integers 1-3,5-8,9,13- (Abigail)
Re: Expanding lists of ranges of integers 1-3,5-8,9,13- <bart.lateur@skynet.be>
Re: Help! <simon@nospam.simonwebdesign.com>
Re: how to remove a file using perl? (Villy Kruse)
Re: Matts Script Archive - A critique <pdcawley@bofh.org.uk>
newbie question: rearanging data files <berndt.zeitler@tu-berlin.de>
Re: newbie question: rearanging data files <berndt.zeitler@tu-berlin.de>
Re: Nobody loves me? (Gwyn Judd)
parallelport programming in PERL schanbacher@my-deja.com
regexp match inside a time interval ? man@rila.bg
start perlscript as nt service <haggi@tappe.net>
Re: Suggestion for syntax change <elephant@squirrelgroup.com>
user login NT <haggi@tappe.net>
user logout on NT <haggi@tappe.net>
Re: Was Why won't "use strict;" work? (Villy Kruse)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 27 Jul 2000 10:35:04 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Advanced Perl Programming -- Dated?
Message-Id: <964690658.11555.0.nnrp-12.c3ad6973@news.demon.co.uk>
> WK> In risk of getting the wrath of the greeat blow torch. Have you
found a
> WK> review of the Laura Lemay book yet?
>
>is that the 21 day book? it sucks in all editions.
Still haven't seen ANY reviews of the Lemay version, apart from on Amazon,
and its difficult to tell which is which.
All the major reviews are of the older book.
>the 24 hour book was
>written by a known perl hacker and is a good intro/intermediate book. it
>doesn't talk down to the reader and it is factually accurate.
>
A point- How on earth can we judge books (including the Panther book we
started off with), when the reviews are almost as dated as the books
themselves. If someone updated A.P.P. it might just get into print in time
for perl 6...
------------------------------
Date: Thu, 27 Jul 2000 09:15:39 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Custom mail headers with perl
Message-Id: <slrn8nvvjj.1o5.tjla@thislove.dyndns.org>
I was shocked! How could Jason Dixon <jason@mybowie.com>
say such a terrible thing:
>Hi all-
>
>I've written a script to email a list of people with updates on my site. The
>script works great, except I'm having difficulty customizing the "From" section
>of the header (no problems at all with the "Subject"). Instead of changing the
>From header to my variable, it uses the "real" header (from a machine that is
>NOT in my domain), but inserts the new header into the body of the email (???).
Maybe sendmail is using address rewriting?
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Says an airlining wanton named Vi:
"I'm a pantyless stew when I fly.
To a muffer's delight,
I'll take head on a flight,
So the guy can have pie in the sky."
------------------------------
Date: Thu, 27 Jul 2000 07:41:38 GMT
From: astewart@spawar.navy.mil
Subject: difference between require $file and require Module
Message-Id: <397fe666.3193982@news.pwy1.sdca.home.com>
Quite some time ago Tom C. posted an explanation of the differences
between do, require and use, which said, in part:
3) require Module is like require "Module.pm", except the former:
3.1: translates each "::" into your system's directory separator.
3.2: primes the parser to disambiguate class Module as an indirect
object.
Could Tom or someone elaborate on what 3.2 means?
Alan
------------------------------
Date: 27 Jul 2000 03:13:05 EDT
From: abigail@foad.org (Abigail)
Subject: Re: difference between two times in seconds
Message-Id: <slrn8nvo7p.vcg.abigail@alexandra.foad.org>
Logan Shaw (logan@cs.utexas.edu) wrote on MMDXXII September MCMXCIII in
<URL:news:8lol1q$o58$1@provolone.cs.utexas.edu>:
** In article <x74s5c6qh6.fsf@home.sysarch.com>,
** Uri Guttman <uri@sysarch.com> wrote:
** >>>>>> "LS" == Logan Shaw <logan@cs.utexas.edu> writes:
** >
** > LS> Is $_[0] secretly some kind of reference into the caller's
** > LS> argument list or something? And why does setting @_ to
** > LS> itself clear this status?
** >
** >read perlsub. @_ is aliased to the args passed to a sub. assigning @_
** >does a copy of the real values. reusing @_ for the copy is just subterfuge
**
** O.K., but I'm still curious why it works in 10 out of the 11 cases. It
** seems like in 9 out of the 10 cases where it does work, it's modifying
** both values anyway. So why does it suddenly break only when $_[0] hits
** zero?
Because in the first 10 cases, you modify @_. Only in the last
case @_ remains unmodified.
Abigail
--
perl -wle 'print "Prime" if (0 x shift) !~ m 0^\0?$|^(\0\0+?)\1+$0'
------------------------------
Date: 27 Jul 2000 03:50:45 EDT
From: abigail@foad.org (Abigail)
Subject: Re: difference between two times in seconds
Message-Id: <slrn8nvqeb.vcg.abigail@alexandra.foad.org>
Logan Shaw (logan@cs.utexas.edu) wrote on MMDXXII September MCMXCIII in
<URL:news:8loluv$o6f$1@provolone.cs.utexas.edu>:
@@
@@ As long as we're coming up with regular expression challenges, I want
@@ to see somebody write a regular expression to find the prime
@@ factorization of an number. Heck, you can even do the
@@
@@ $string = '1' x $number;
Well, that's very trivial.
sub factors ($);
sub factors ($) {
local $_ = 1 x shift;
/^(11+?)\1+$/ ? (length $1, factors (@_ = /$1/g)) : length;
}
And in my sig is a regex solving Towers of Hanoi (requires a pre 5.6.0
to work).
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
------------------------------
Date: Thu, 27 Jul 2000 08:12:16 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: difference between two times in seconds
Message-Id: <slrn8nvre5.61h.bernard.el-hagin@gdndev25.lido-tech>
On 27 Jul 2000 01:47:59 -0500, Logan Shaw <logan@cs.utexas.edu> wrote:
>As long as we're coming up with regular expression challenges, I want
>to see somebody write a regular expression to find the prime
>factorization of an number. Heck, you can even do the
>
> $string = '1' x $number;
>
>thing (and match against $string) and I will still be impressed.
From the Perl Cookbook:
#!/usr/bin/perl
# prime_pattern -- find prime factors of argument using pattern matching
for ($N = ('o' x shift); $N =~ /^(oo+?)\1+$/; $N =~ s/$1/o/g) {
print length($1), " ";
}
print length ($N), "\n";
Bernard
--
perl -le 'open(JustAnotherPerlHacker,"")or$_="B$!e$!r$!n$!a$!r$!d$!";
print split/No such file or directory/;'
------------------------------
Date: Thu, 27 Jul 2000 08:56:48 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Do I Need Chomp? <was Critiques, please>
Message-Id: <tptvnsk3i6d2e0d861mhajrhk139uqo7ue@4ax.com>
BUCK NAKED1 wrote:
>Do I need to add "chomp" (as I have now done) in the coding below?
You need it here:
>my $num = <COUNT> || 0;
>chomp $num;
because you added a newline here:
>print COUNT "$num\n";
and you don't want the newline inside this string, follwong the number:
>print("You are the $num visitor to this webpage");
Well, that's the idea. However, if you do
$num = "123\n";
$num++;
print "<$num>\n";
then you'll see
<124>
so, treating and modifying the string, by increment (and add), will
ignore and remove the newline.
So it will appear to do the same.
But, if ever you remove the "$num++" statement, then you'll immediately
see the difference. The version with chomp is the one that will behave.
Oh, one more critique: you're closing the file after you've done the
formatting and printed out the result to the browser. Other versions of
this script could be waiting to flock this file, so you want to minimize
the time the file is locked.
So, it's a better idea to close the file as soon as you're finished with
it, i.e. right after the print line.
--
Bart.
------------------------------
Date: Thu, 27 Jul 2000 09:07:25 +0200
From: "Jouke Visser" <jouke@nedstat.nl>
Subject: Re: Does anybody know how to use ptkdbw?
Message-Id: <8lon08$b78$1@news1.xs4all.nl>
<cut>
> for a long time. My problem is now that I cannot figure out how to
> install/use it. perl -d ptkdbw.pm does not work even if I try it with path
> imformation.
Almost correct: perl -d:ptkdb <scriptname>
Cheers,
Jouke.
------------------------------
Date: 27 Jul 2000 09:05:23 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Error msg for perl using DBI??
Message-Id: <8loqg3$ik0$1@orpheus.gellyfish.com>
On Tue, 25 Jul 2000 17:58:07 +0800 JL wrote:
> Hi,
>
> I always get the following error message:
> "DBI::db=HASH(0x817d86c)->disconnect invalidates 2 active statement handles
> (either destroy statement handles or call finish on them before
> disconnecting) at test.pl line 15."
>
Well did you call finish() on them ? Largely this problem is sorted out
by making both database handles and statement handles lexical variables
and by restricting their scope to the minimum needed for the program.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: 27 Jul 2000 08:14:53 GMT
From: Jim Monty <monty@primenet.com>
Subject: Expanding lists of ranges of integers 1-3,5-8,9,13-14
Message-Id: <8lor1t$1p$1@nnrp02.primenet.com>
Not long ago on the Fun With Perl mailing list, there was an
impromptu Perl golf challenge to expand lists of ranges of integers,
e.g., to transform the string
'1-3,5-8,10,13-14'
into the list
(1, 2, 3, 5, 6, 7, 8, 10, 13, 14)
Of course TMTOWTDI, but what's the canonical way?
--
Jim Monty
monty@primenet.com
Tempe, Arizona USA
------------------------------
Date: 27 Jul 2000 04:45:37 EDT
From: abigail@foad.org (Abigail)
Subject: Re: Expanding lists of ranges of integers 1-3,5-8,9,13-14
Message-Id: <slrn8nvtla.vcg.abigail@alexandra.foad.org>
Jim Monty (monty@primenet.com) wrote on MMDXXII September MCMXCIII in
<URL:news:8lor1t$1p$1@nnrp02.primenet.com>:
-- Not long ago on the Fun With Perl mailing list, there was an
-- impromptu Perl golf challenge to expand lists of ranges of integers,
-- e.g., to transform the string
--
-- '1-3,5-8,10,13-14'
--
-- into the list
--
-- (1, 2, 3, 5, 6, 7, 8, 10, 13, 14)
--
-- Of course TMTOWTDI, but what's the canonical way?
local $_ = "1-3,5-8,10,13-14";
s/-/../g; @list = eval;
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
------------------------------
Date: Thu, 27 Jul 2000 08:59:44 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Expanding lists of ranges of integers 1-3,5-8,9,13-14
Message-Id: <pbuvns4kr17cg5utuku3cq6vb8mv5h0jf4@4ax.com>
Jim Monty wrote:
> '1-3,5-8,10,13-14'
>
>into the list
>
> (1, 2, 3, 5, 6, 7, 8, 10, 13, 14)
I'm not on that mailing list, so I've not seen that thread.
This is a dirty trick:
$_ = '1-3,5-8,10,13-14';
s/-/../g;
@list = eval "($_)";
--
Bart.
------------------------------
Date: Thu, 27 Jul 2000 09:02:20 GMT
From: "Simon" <simon@nospam.simonwebdesign.com>
Subject: Re: Help!
Message-Id: <wUSf5.1563$07.207827@news3.cableinet.net>
Hey everyone thanks for telling me to use Mime::Lite, if only I had read the
first post ;¬)
What I need it for someone to help me write the Perl for this, and I *might*
be able to offer some money for this..
...Any takers?
Simon
------------------------------
Date: 27 Jul 2000 09:28:12 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: how to remove a file using perl?
Message-Id: <slrn8o004r.583.vek@pharmnl.ohout.pharmapartners.nl>
On 26 Jul 2000 16:06:50 EDT, Abigail <abigail@foad.org> wrote:
>Aart Jan van der Linden (send@no.mail) wrote on MMDXXI September MCMXCIII
>in <URL:news:397f393d.9459315@news.ams.chello.nl>:
>[] What would be the syntax to remove a file (filename is in the variable
>[] $FORM{titel} ) from a folder on my server? (I have full rights to
>[] remove files from this folder)
>
>
>man perlfunc lists functions by category. There's an obvious category
>for your problem, and the function you need is listed there.
>
>
I beleive it is time well spent to read all the supplied documentation,
for the purpose of getting in idea of where everything is documented.
From:
perldoc perl
For ease of access, the Perl manual has been split up into
a number of sections:
perl Perl overview (this section)
perldelta Perl changes since previous version
perlfaq Perl frequently asked questions
... end so on. No nead to quote the whole thing.
Villy
------------------------------
Date: 27 Jul 2000 10:19:31 +0100
From: Piers Cawley <pdcawley@bofh.org.uk>
Subject: Re: Matts Script Archive - A critique
Message-Id: <m11z0gorq4.fsf@rt158.private.realtime.co.uk>
mjd@plover.com (Mark-Jason Dominus) writes:
> In article <397d0615.5d7f$e3@news.op.net>,
> Mark-Jason Dominus <mjd@plover.com> wrote:
> >If anyone is a genuine beginner and wants to provide some genuine
> >code to serve as the subject of a future article...
>
> One benefit to you, is that if your program has a bug that you just
> can't figure out, I'll probably find it and tell you what was wrong.
And, if MJD can't find the bug he can probably come up with a much
better subject line for the post to c.l.p.m asking for assistance.
--
Piers
------------------------------
Date: Thu, 27 Jul 2000 10:44:55 +0200
From: "berndt zeitler" <berndt.zeitler@tu-berlin.de>
Subject: newbie question: rearanging data files
Message-Id: <8losm9$i57$1@mamenchi.zrz.TU-Berlin.DE>
Hi Perlers,
I'm a newbie to Perl as you could see in the subject.
I would like to sort a bunch of data files that are similar to the listing
below,
but don't realy know where to start. The single ones ( 1 ) are also
sometimes ( -1 ).
This is what the files look like:
1 "Level Ieq"
"S" 50.0 "S" 63.0 "S" 80.0 "S" 100 "S" 125 "S" 160 "S" 200
"S" 250 "S" 315 "S" 400 "S" 500 "S" 630 "S" 800 "S" 1000
"S" 1250 "S" 1600 "S" 2000 "S" 2500 "S" 3150 "S" 4000 "S" 5000
1 45.1 1 47.1 1 48.6 1 61.0 1 51.0 1 49.1 1 57.7
1 51.1 1 49.8 1 48.3 1 48.8 1 42.7 1 42.5 1 41.8
1 45.7 1 48.0 1 48.4 1 51.4 1 54.2 1 54.5 1 53.8
1 "Level Ieq"
"S"" A-Net""S"" Lin "
1 61.8 1 65.5
1 "Level Leq"
50.0 63.0 80.0 100 125 160 200 250 315
400 500 630 800 1000 1250 1600 2000 2500 3150
4000 5000 " A-Net"" Lin "
57.2 52.2 64.8 67.2 59.8 60.2 61.7 57.3 57.2
55.9 54.4 49.3 50.4 48.8 50.8 51.8 52.3 55.0 57.9
57.7 56.8 65.9 72.1
1 "Level Lw"
"S" 50.0 "S" 63.0 "S" 80.0 "S" 100 "S" 125 "S" 160 "S" 200
"S" 250 "S" 315 "S" 400 "S" 500 "S" 630 "S" 800 "S" 1000
"S" 1250 "S" 1600 "S" 2000 "S" 2500 "S" 3150 "S" 4000 "S" 5000
1 45.1 1 47.1 1 48.6 1 61.0 1 51.0 1 49.1 1 57.7
1 51.1 1 49.8 1 48.3 1 48.8 1 42.7 1 42.5 1 41.8
1 45.7 1 48.0 1 48.4 1 51.4 1 54.2 1 54.5 1 53.8
1 "Level Lw"
"S"" A-Net""S"" Lin "
1 61.8 1 65.5
1 "Level Lk"
50.0 63.0 80.0 100 125 160 200 250 315
400 500 630 800 1000 1250 1600 2000 2500 3150
4000 5000 " A-Net"" Lin "
12.0 5.0 16.2 6.2 8.8 11.2 4.0 6.2 7.4 7
.6 5.6 6.6 7.9 7.0 5.0 3.8 3.9 3.7 3.7
3.3 3.1 4.1 6.6
and this is what i want it to look like:
50 45,1 57,2 45,1 12
63 47,1 52,2 47,1 5
80 48,6 64,8 48,6 16,2
100 61 67,2 61 6,2
125 51 59,8 51 8,8
160 49,1 60,2 49,1 11,2
200 57,7 61,7 57,7 4
250 51,1 57,3 51,1 6,2
315 49,8 57,2 49,8 7,4
400 48,3 55,9 48,3 7,6
500 48,8 54,4 48,8 5,6
630 42,7 49,3 42,7 6,6
800 42,5 50,4 42,5 7,9
1.000 41,8 48,8 41,8 7
1.250 45,7 50,8 45,7 5
1.600 48 51,8 48 3,8
2.000 48,4 52,3 48,4 3,9
2.500 51,4 55 51,4 3,7
3.150 54,2 57,9 54,2 3,7
4.000 54,5 57,7 54,5 3,3
5.000 53,8 56,8 53,8 3,1
A-Net 61,8 65,9 61,8 4,1
Lin 65,5 72,1 65,5 6,6
The first row is the frequency. In every second row pair there is a "S" and
a 1 (or -1) pair.
I can load the file into an array:
$datafile = "file001.txt";
open(DATAFILE,"$datafile") || die "can't open $datafile";
@alldata=<DATAFILE>;
and get the frequency:
@freq=split(/\s*\"S\s*\"/,@alldata[1]);
and i was thinking of putting each row pair:
"S" 50.0 "S" 63.0 "S" 80.0 "S" 100 "S" 125 "S" 160 "S" 200
"S" 250 "S" 315 "S" 400 "S" 500 "S" 630 "S" 800 "S" 1000
"S" 1250 "S" 1600 "S" 2000 "S" 2500 "S" 3150 "S" 4000 "S" 5000
1 45.1 1 47.1 1 48.6 1 61.0 1 51.0 1 49.1 1 57.7
1 51.1 1 49.8 1 48.3 1 48.8 1 42.7 1 42.5 1 41.8
1 45.7 1 48.0 1 48.4 1 51.4 1 54.2 1 54.5 1 53.8
into a hash array,
%FreqIeq=@alldata[1,2];
%FreqLeq=@alldata[7,8];
%FreqLw=@alldata[10,11];
%FreqLk=@alldata[16,17];
print"$FreqIeq{@freq}";
but this doesn't seem to work like this.
do i have to transpose it and use qw() too?
please help me out on this, or tell me where i can find some more
information and what functions i should look at.
thanks a lot in advance.
ciao for now,
berndt
------------------------------
Date: Thu, 27 Jul 2000 11:25:22 +0200
From: "berndt zeitler" <berndt.zeitler@tu-berlin.de>
Subject: Re: newbie question: rearanging data files
Message-Id: <8lov23$leh$1@mamenchi.zrz.TU-Berlin.DE>
it's me again,
i just noticed that the file i sent was reformated. the file should look
like this.
i will put "Line Nr.:" where each new line starts.
LINE 1: 1 "Level Ieq"
LINE 2: "S" 50.0 "S" 63.0 "S" 80.0 "S" 100 "S" 125 "S" 160
"S" 200
"S" 250 "S" 315 "S" 400 "S" 500 "S" 630 "S" 800 "S" 1000
"S" 1250 "S" 1600 "S" 2000 "S" 2500 "S" 3150 "S" 4000 "S" 5000
LINE 3: 1 45.1 1 47.1 1 48.6 1 61.0 1 51.0 1 49.1 1
57.7
1 51.1 1 49.8 1 48.3 1 48.8 1 42.7 1 42.5 1 41.8
1 45.7 1 48.0 1 48.4 1 51.4 1 54.2 1 54.5 1 53.8
LINE 4: 1 "Level Ieq"
LINE 5: "S"" A-Net""S"" Lin "
LINE 6: 1 61.8 1 65.5
LINE 7: 1 "Level Leq"
LINE 8: 50.0 63.0 80.0 100 125 160 200 250
315
400 500 630 800 1000 1250 1600 2000 2500 3150
4000 5000 " A-Net"" Lin "
LINE 9: 57.2 52.2 64.8 67.2 59.8 60.2 61.7 57.3
57.2
LINE 10: 55.9 54.4 49.3 50.4 48.8 50.8 51.8 52.3
55.0 57.9
57.7 56.8 65.9 72.1
LINE 11: 1 "Level Lw"
LINE 12: "S" 50.0 "S" 63.0 "S" 80.0 "S" 100 "S" 125 "S" 160
"S" 200
"S" 250 "S" 315 "S" 400 "S" 500 "S" 630 "S" 800 "S" 1000
"S" 1250 "S" 1600 "S" 2000 "S" 2500 "S" 3150 "S" 4000 "S" 5000
LINE 13: 1 45.1 1 47.1 1 48.6 1 61.0 1 51.0 1 49.1
1 57.7
1 51.1 1 49.8 1 48.3 1 48.8 1 42.7 1 42.5 1 41.8
1 45.7 1 48.0 1 48.4 1 51.4 1 54.2 1 54.5 1 53.8
LINE 14: 1 "Level Lw"
LINE 15: "S"" A-Net""S"" Lin "
LINE 16: 1 61.8 1 65.5
LINE 17: 1 "Level Lk"
LINE 18: 50.0 63.0 80.0 100 125 160 200 250
315
400 500 630 800 1000 1250 1600 2000 2500 3150
4000 5000 " A-Net"" Lin "
LINE 19: 12.0 5.0 16.2 6.2 8.8 11.2 4.0 6.2
7.4 7
.6 5.6 6.6 7.9 7.0 5.0 3.8 3.9 3.7 3.7
3.3 3.1 4.1 6.6
------------------------------
Date: Thu, 27 Jul 2000 09:46:20 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Nobody loves me?
Message-Id: <slrn8o01d4.1o5.tjla@thislove.dyndns.org>
I was shocked! How could Jason Dixon <fuzzyping@freewwweb.net>
say such a terrible thing:
>I've written a script to email a list of people with updates on my
>site. The script works great, except I'm having difficulty customizing
>the "From" section of the header (no problems at all with the
>"Subject"). Instead of changing the From header to my variable, it uses
>the "real" header (from a machine that is NOT in my domain), then
>inserts the new header into the body of the email (???).
Have a look in your sendmail.mc for a line a bit like:
FEATURE(masquerade_envelope)
FEATURE(genericstable, hash -o `/etc/mail/genericstable')
This is the address rewriting stuff, maybe yours is doing that?
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
"Kill the Wabbit, Kill the Wabbit, Kill the Wabbit!"
-- Looney Tunes, "What's Opera Doc?" (1957, Chuck Jones)
------------------------------
Date: Thu, 27 Jul 2000 07:02:18 GMT
From: schanbacher@my-deja.com
Subject: parallelport programming in PERL
Message-Id: <8lompq$vfm$1@nnrp1.deja.com>
Hi,
does anyone know how it is possible to programm the
parallelport in PERL on a Linux PC ?
many thanks and best regards
de Snuggel
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 27 Jul 2000 07:38:19 GMT
From: man@rila.bg
Subject: regexp match inside a time interval ?
Message-Id: <8lootb$20c$1@nnrp1.deja.com>
Hello All, need a help, question follows:
I want if some regexp has not matched for a specified time(1-2 secs),
then the match statement should be interrupted(some flag set) and
script continues the statement after regexp match.
example of what I need:
if( m/complex regexp over huge string(file)/ ) {
#ok
}
if( $failure_flag ) { # if failure, then flag is set
#failure
}
best regards , margarit nickolov.
I apologize for bad english :(
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 27 Jul 2000 09:41:42 +0200
From: "haggi@work" <haggi@tappe.net>
Subject: start perlscript as nt service
Message-Id: <397FE7B6.A38A0B06@tappe.net>
Hi,
is it possible to start a perlscript as soon as the winNT machine boots?
I want it to run in the background, it contains a forever-loop.
haggi
--
---------------------------------------------------------
haggi
www.haggi.de
haggi@haggi.de
haggi`s visual effects & animation
---------------------------------------------------------
------------------------------
Date: Thu, 27 Jul 2000 09:49:01 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Suggestion for syntax change
Message-Id: <MPG.13eaa2e8babbb2cb989692@news>
Larry Rosler writes ..
>In article <397F10C7.8BE8C5B@mindspring.com> on Wed, 26 Jul 2000
>11:24:39 -0500, Keith G. Murphy <keithmur@mindspring.com> says...
>
>...
>
>> Wouldn't:
>>
>> for ($last downto $first) { }
>>
>> be a sweet thing to be able to do? :-)
>
>This thread has been going on for a long time, and I have been away for
>much of it and haven't caught up. So please forgive my presumption in
>wondering whether the following has been considered adequately:
>
> for (reverse $first .. $last) { }
>
>At the cost of one more (efficient) operation, doesn't this accomplish
>all that the proposed new syntax is inted to provide?
actually that does replace all proposed behaviour of my original idea
(where LIST[2..-1] is equivalent to LIST[2,1,0,-1]) which I've now
abandoned
I had never tried and didn't really realise that you could call
functions like reverse within list indexes
HOWEVER .. it doesn't solve the behaviour that Keith is proposing where
within list index context the negative arguments of '..' are evaluated
first (to be indices relative to the end of the list) and THEN the '..'
is evaluated to produce a forward list
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Thu, 27 Jul 2000 09:45:17 +0200
From: "haggi@work" <haggi@tappe.net>
Subject: user login NT
Message-Id: <397FE88D.4131DC0A@tappe.net>
Hi,
is there a possiblility to recognize if a user is logged in on WinNT with a perl
script?
At the moment i do it with a search for the "EXPLORER" process, but this is not
really the best way I think.
haggi
--
---------------------------------------------------------
haggi
www.haggi.de
haggi@haggi.de
haggi`s visual effects & animation
---------------------------------------------------------
------------------------------
Date: Thu, 27 Jul 2000 09:47:09 +0200
From: "haggi@work" <haggi@tappe.net>
Subject: user logout on NT
Message-Id: <397FE8FD.851530A2@tappe.net>
Is there a way to execute a perl script as soon as a user loggs out?
Something like .logout or the pandant to the autostart folder?
Something like autoleave??
haggi
--
---------------------------------------------------------
haggi
www.haggi.de
haggi@haggi.de
haggi`s visual effects & animation
---------------------------------------------------------
------------------------------
Date: 27 Jul 2000 09:53:18 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: Was Why won't "use strict;" work?
Message-Id: <slrn8o01kd.583.vek@pharmnl.ohout.pharmapartners.nl>
On Wed, 26 Jul 2000 22:04:11 -0500 (CDT),
BUCK NAKED1 <dennis100@webtv.net> wrote:
>I apologize for the poor form of that post. That's really strange. I
>took much longer to write that post than any other that I have posted in
>here, and was more careful than on any other post to make sure it was in
>proper order. I even had the thoughts numbered, and though it was well
>organized.
>
Usualy HTML means WYSINWWG
What You See Is NOT What We Get.
Villy
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 3818
**************************************