[18892] in Perl-Users-Digest
Perl-Users Digest, Issue: 1060 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 5 09:05:53 2001
Date: Tue, 5 Jun 2001 06:05:11 -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: <991746311-v10-i1060@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 5 Jun 2001 Volume: 10 Number: 1060
Today's topics:
Re: 2 questions about flock <m.grimshaw@salford.ac.uk>
Re: 2 questions about flock (Anno Siegel)
Re: 2 questions about flock <keesh@users.sf.net>
Re: 2 questions about flock <m.grimshaw@salford.ac.uk>
Re: 2 questions about flock (Garry Williams)
Re: Beginner's Language? <reply-via@my-web-site.com>
Bug in assignment operator (Anno Siegel)
change user <Marc.Grietens@alcatel.be>
Re: change user (Anno Siegel)
Re: change user <Marc.Grietens@alcatel.be>
Re: Deleting old files <webmaster@webdragon.unmunge.net>
Re: format/write with alternate linefeeds ? <webmaster@webdragon.unmunge.net>
Re: How to add a 0 in front of single number??? <Rene.Scheibe@gmx.net>
Re: How to add a 0 in front of single number??? (Bernard El-Hagin)
Re: locking files before writing data (?) <muddycat@hotmail.com>
Re: locking files before writing data (?) <muddycat@hotmail.com>
Re: locking files before writing data (?) <muddycat@hotmail.com>
Re: locking files before writing data (?) <muddycat@hotmail.com>
Net::SNMP question (Elias_Haddad)
Newbie guide <kkirwan@emory.edu>
Re: OT :: What to do if you've been kill filed (Rachel Coleman)
Re: OT :: What to do if you've been kill filed (Anno Siegel)
Re: Perl Dummy! <krahnj@acm.org>
Re: perl/cgi and dynamic hyperlink <thunderbear@bigfoot.com>
Re: perl/cgi and dynamic hyperlink <godzilla@stomp.stomp.tokyo>
PYML, Python, Perl and Zope (John Abbe)
Re: PYML, Python, Perl and Zope <andersh@nextramobile.com>
Re: PYML, Python, Perl and Zope <temp1@williamc.com>
thank you <eng80956@nus.edu.sg>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 05 Jun 2001 09:51:52 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: 2 questions about flock
Message-Id: <3B1C9DA8.1658607A@salford.ac.uk>
Thanks,
So presumably, if I LOCK_SH/LOCK_EX a file that already has a LOCK_EX,
the former will wait at that point in the script for the latter to be
LOCK_UN'd?
Any ideas about flock and a db_fle that is tie'd? Would I have to
open() the db_file for writing, then LOCK_EX it before tieing it?
Ciaran McCreesh wrote:
>
> In article <3B1BC99B.5076A474@salford.ac.uk>, "Mark Grimshaw"
> <m.grimshaw@salford.ac.uk> said:
> > Thanks. So to be safe/efficient, use LOCK_EX for writing and LOCK_SH
> > for reading?
>
> Ya, pretty much. I sometimes skip LOCK_SHing a file if I'm fairly sure
> no-one else will be using it, but for safety it's a good idea.
>
> > When you say this:
> >> "Obviously, there can only ever be
> >> one LOCK_EX on a file at a time."
> > do you actually mean file or filehandle?
>
> A file. Well, techincally, I guess, a resource, since in theory locking
> isn't necessarily limited to files, but basically a file. A file handle
> is just a way of accessing a file. The lock is established via the handle
> (that's not too elegant an explanation...) but it acts upon the file the
> handle refers to.
>
> I'm not entirely sure what happens on *nix if you flock a symlinked file,
> I would guess it would lock the file being linked to...
>
> --
> Ciaran McCreesh
> mail: keesh at users dot sf dot net
> web: http://www.opensourcepan.com
------------------------------
Date: 5 Jun 2001 09:45:53 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: 2 questions about flock
Message-Id: <9fi9oh$1ll$1@mamenchi.zrz.TU-Berlin.DE>
[Please, in the future, put your reply _after_ the suitably trimmed text
you reply to. It's the commonly accepted quoting style on this
newsgroup, and Usenet in general. Thanks]
According to Mark Grimshaw <m.grimshaw@salford.ac.uk>:
> Thanks,
>
> So presumably, if I LOCK_SH/LOCK_EX a file that already has a LOCK_EX,
> the former will wait at that point in the script for the latter to be
> LOCK_UN'd?
LOCK_UN is rarely used. The standard way of releasing a lock is
by closing the filehandle.
> Any ideas about flock and a db_fle that is tie'd? Would I have to
> open() the db_file for writing, then LOCK_EX it before tieing it?
That is a possibility. It is more common to keep an extra lock file
besides the database file(s) and lock that.
Anno
------------------------------
Date: Tue, 05 Jun 2001 10:04:46 GMT
From: "Ciaran McCreesh" <keesh@users.sf.net>
Subject: Re: 2 questions about flock
Message-Id: <292T6.4784$IY1.736600@news1.cableinet.net>
In article <3B1C9DA8.1658607A@salford.ac.uk>, "Mark Grimshaw"
<m.grimshaw@salford.ac.uk> said:
> So presumably, if I LOCK_SH/LOCK_EX a file that already has a LOCK_EX,
> the former will wait at that point in the script for the latter to be
> LOCK_UN'd?
Yes. A close will also unlock a file.
> Any ideas about flock and a db_fle that is tie'd? Would I have to
> open() the db_file for writing, then LOCK_EX it before tieing it?
No idea, sorry. The only database locking I've done has been
database-specific, I've never used tie seriously.
--
Ciaran McCreesh
mail: keesh at users dot sf dot net
web: http://www.opensourcepan.com
------------------------------
Date: Tue, 05 Jun 2001 12:39:43 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: 2 questions about flock
Message-Id: <3B1CC4FF.AB11AAE0@salford.ac.uk>
Anno Siegel wrote:
> According to Mark Grimshaw <m.grimshaw@salford.ac.uk>:
> > Thanks,
> >
> > So presumably, if I LOCK_SH/LOCK_EX a file that already has a LOCK_EX,
> > the former will wait at that point in the script for the latter to be
> > LOCK_UN'd?
>
> LOCK_UN is rarely used. The standard way of releasing a lock is
> by closing the filehandle.
>
> > Any ideas about flock and a db_fle that is tie'd? Would I have to
> > open() the db_file for writing, then LOCK_EX it before tieing it?
>
> That is a possibility. It is more common to keep an extra lock file
> besides the database file(s) and lock that.
>
> Anno
Thanks.
------------------------------
Date: Tue, 05 Jun 2001 12:17:20 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: 2 questions about flock
Message-Id: <slrn9hpjef.3fl.garry@zfw.zvolve.net>
On Tue, 05 Jun 2001 09:51:52 +0100, Mark Grimshaw
<m.grimshaw@salford.ac.uk> wrote:
> Any ideas about flock and a db_fle that is tie'd?
Yes. Don't. See the DB_File manual page for why. Use Anno's
suggestion instead.
--
Garry Williams
------------------------------
Date: Tue, 5 Jun 2001 15:03:57 +0200
From: "Biep @ http://www.biep.org/" <reply-via@my-web-site.com>
Subject: Re: Beginner's Language?
Message-Id: <9fil63$47n84$1@ID-63952.news.dfncis.de>
Andrew Bromage comments:
> Natural languages are morally neutral.
Jerzy Karczmarczuk wrote:
> What is "morally neutral"?? In natural languages you can LIE!
Matthias Blume <blume@research.bell-labs.com> writes:
> You can lie in most programming languages as well. (In C it's called
"cast".)
"Lex Spoon" <lex@cc.gatech.edu> wrote in message
news:m37kz1utg9.fsf@chaos.resnet.gatech.edu...
> And if you are implementing a billing program,
> you can have it print out any kind of bills that suit your fancy,
> regardless of what people actually owe you.
> By almost any meaning of "lie", you can do it in programming languages!
But isn't that what "morally neutral" implies? You can speak the truth,
AND you can lie.
A language that allowed only one of these options would not be neutral..
--
Biep
Reply via http://www.biep.org
------------------------------
Date: 5 Jun 2001 11:10:53 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Bug in assignment operator
Message-Id: <9fient$9ji$1@mamenchi.zrz.TU-Berlin.DE>
"...a list assignment is scalar context returns the number of elements
produced by the expression on the right hand side of the assignment"
(perlop).
This leads to the idiomatic
my $num_elements = () = <something to be evaluated in list context>
to find how many elements the right hand side produces without keeping
them.
It doesn't work this way when the expression on the right hand side
is a split operation. Specifically,
my $num_parts = () = split /,/, 'a,b,c';
sets $num_parts to 1, not 3. I observed this with v5.6.0 and v5.6.1.
Any comments before I send a bug report?
Anno
------------------------------
Date: Tue, 05 Jun 2001 11:48:47 +0200
From: Marc GRIETENS <Marc.Grietens@alcatel.be>
Subject: change user
Message-Id: <3B1CAAFF.FC293383@alcatel.be>
hellow,
i'm using a script to copy some files from clearcase to somewhere
outside clearcase based on a file list.
now the problem is that the files can only be accessed using a regular
user id (eg mine),
but when all copying of files is done,
some files need to change owner/permissions.
Only root here is allowed to change the owner of something.
but using root in clearcase we just can't access all files correctly.
if someone can tell me or show me the way ;-)
so that the script becomes something like this.
- script is run as user root.
1. change to normal user.
do some stuff (copy files, output etc etc)
2. become back root
do other stuff.
how to manage the changes to another user account ?
thanx,
Marc
------------------------------
Date: 5 Jun 2001 11:15:36 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: change user
Message-Id: <9fif0o$9ji$2@mamenchi.zrz.TU-Berlin.DE>
According to Marc GRIETENS <Marc.Grietens@alcatel.be>:
[...]
> so that the script becomes something like this.
>
> - script is run as user root.
>
> 1. change to normal user.
> do some stuff (copy files, output etc etc)
> 2. become back root
> do other stuff.
>
> how to manage the changes to another user account ?
Check the variables $<, $>, $( and $) in perlvar.
Anno
------------------------------
Date: Tue, 05 Jun 2001 14:05:06 +0200
From: Marc GRIETENS <Marc.Grietens@alcatel.be>
Subject: Re: change user
Message-Id: <3B1CCAF2.33F767AF@alcatel.be>
Anno Siegel wrote:
>
> According to Marc GRIETENS <Marc.Grietens@alcatel.be>:
>
> [...]
>
> Check the variables $<, $>, $( and $) in perlvar.
oki ... thanks.
I didn't knew it could be just that easy.
I'm starting to love perl more and more :))
Marc
--
V Alcatel Bell N.V.
o-----------------o Network Application Division
| A L C A T E L | Generaal De Witte Laan 11A
o-----------------o 2800 Mechelen - Belgium
Email: Marc.Grietens@alcatel.be Phone: +32 15 29 3437
-------------------------------------------------------------------------
------------------------------
Date: 5 Jun 2001 10:11:48 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: Deleting old files
Message-Id: <9fib94$s89$0@216.155.32.170>
In article <3B1BE7CF.81D804ED@sky.net>, Steve <cochise@sky.net> wrote:
| Is there a way to delete files that are older that a certain time?
yup. lots of 'em.
| I've got some temporary graphics whose names are based on the time that
| they were created using localtime.
|
| 991680688.gif
| 991679373.gif
| etc.
|
| At the moment I'm using:
|
| unlink <9*.gif>;
|
| and deleting them all.
*inarticulate expression of disbelief*
| I would rather delete anything that is older than say 2 hours and keep
| the more recent files ... which would in turn be deleted later on in the
| day.
makes more sense. :)
| Any help, or direction to the appropriate on-line resource, would be
| appreciated.
here's some code I currently have running as part of a .cgi script, that
cleans up older files (24-hours old) during the course of its regular
usage.
# During-Usage Cleanup of old user-created files, but preserve
# our samples.
opendir(DIR, $output_path)
or die "Cannot open output dir $output_path -- $!";
my @oldfiles = readdir(DIR);
closedir(DIR)
or die "closing read on $output_path directory failed: $!";
foreach my $oldfile (@oldfiles)
{
# first we attempt to un-taint because we are
# running under -T in this cgi
if ($oldfile =~ /^([-\[\]\{\}\w\.]+)$/) {
$oldfile = $1; # $data now untainted
} else {
die "Bad data in $oldfile"; # log this somewhere
}
# preserve samples, index, and stylesheet
# as well as the 'dot-files'
next if $oldfile =~ /^index/;
next if $oldfile =~ /^dm-sample/;
next if $oldfile =~ /css$/;
next if $oldfile =~ /^[.]+$/;
# now get the time differential between now and file's last
# modification date. non-preserved files older than 24 hours
# get cleaned up.
if ( ( time - (stat("$output_path$oldfile"))[9] ) >= 86400)
{
# -diagnostics- uncomment this and comment out
# the unlink for testing purposes.
# print my $date =
# localtime((stat("$output_path$oldfile"))[9]),
# " = $output_path$oldfile\n";
unlink "$output_path$oldfile"; #older than 24 hours
}
}
Why use a regex at all other than to *ignore* certain files that you
want to *keep* ? (-:
( like . and .. for example ... :-)
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: 5 Jun 2001 09:52:07 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Re: format/write with alternate linefeeds ?
Message-Id: <9fia47$npd$0@216.155.32.170>
In article <9ff9bh$n4h$3@bob.news.rcn.net>,
ebohlman@omsdev.com (Eric Bohlman) wrote:
| Scott R. Godin <webmaster@webdragon.unmunge.net> wrote:
| > Is it possible to do a format/write using alternat (DOS) linefeeds, on a
| > unix box? (the file, while generated on unix will be used on Windows)
| > without having to re-slurp the file and change the linefeeds afterwards?
|
| Binmode the file handle and explicitly terminate lines with "\015\012"
| rather than "\n".
|
| Note that if the file is going to be transferred to a Windows system over
| FTP, the FTP process itself should take care of the conversion. In fact,
| if you did what I suggested, you'd need to make sure that any FTP
| transfers took place in binary mode or else you're likely to get CRLF
| turned into CRLFLF.
Well, the thing is, the two output files (one .html and one .txt) are
dumped into a .tgz archive to make downloading them both simpler and
easiler, so any 'conversion' would need to be done beforehand.
Since it's a write and not a print, there are no "\n"'s in the output
statements, so I'm not exactly certain how to change the default \n to a
\015\012 instead for a write operation.
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: Tue, 5 Jun 2001 09:25:58 +0200
From: "Rene Scheibe" <Rene.Scheibe@gmx.net>
Subject: Re: How to add a 0 in front of single number???
Message-Id: <9fi1f1$39dt6$1@ID-65612.news.dfncis.de>
>s/(?<!\d)(\d)(?!\d)/0$1/g
Can you explain this a bit.
(I think I don't need the g.)
------------------------------
Date: Tue, 5 Jun 2001 08:42:03 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: How to add a 0 in front of single number???
Message-Id: <slrn9hp64u.com.bernard.el-hagin@gdndev25.lido-tech>
On Tue, 5 Jun 2001 09:25:58 +0200, Rene Scheibe <Rene.Scheibe@gmx.net> wrote:
>>s/(?<!\d)(\d)(?!\d)/0$1/g
>Can you explain this a bit.
Read:
perldoc perlre
for an explanation of the regex. Basically:
(?<!PAT) is a zero-width negative look-behind assertion so
(?<!\d)\d means any digit not following a digit
(?!PAT) is a zero-width negative look-ahead assertion so
\d(?!\d) means any digit not followed by a digit
>(I think I don't need the g.)
You need the g if you want the substitution done on all of the digits
in your data.
Cheers,
Bernard
--
perl -le '$#="Just another Perl hacker,"; print print;'
------------------------------
Date: Tue, 5 Jun 2001 10:19:49 +0100
From: "Muddy Cat" <muddycat@hotmail.com>
Subject: Re: locking files before writing data (?)
Message-Id: <thp8vgp7i0331e@corp.supernews.co.uk>
"Ilmari Karonen" <iltzu@sci.invalid> wrote in message
news:991676644.12165@itz.pp.sci.fi...
> In article <thne9lhhpmt0cd@corp.supernews.co.uk>, Muddy Cat wrote:
> >
> >is flock() the way to go? I don't really want a full answer or anything
>
> Yes.
>
> You don't necessarily need to lock a file for appending to it, provided
> that certain conditions are met. (See the Perl FAQ for details.) But
> if you want to remove old data, as you indicate, you _will_ need to lock
> the file.
>
> Of course, if your script is not used very frequently, you might get
> lucky and never have any problems without locking. But your luck might
> run out at any time.
>
> --
> Ilmari Karonen - http://www.sci.fi/~iltzu/
> Please ignore Godzilla / Kira -- do not feed the troll.
Thanks for everyone's very useful input. I also managed to find some really
good info on locking in the FAQ, but there's still something I'm not clear
on. I'm looking at using the following code to get and exclusive lock on the
file I'm updating:
use 5.004;
use Fcntl qw(:DEFAULT :flock);
sysopen(FH, "filename", O_WRONLY | O_CREAT)
or die "can't open filename: $!";
flock(FH, LOCK_EX)
or die "can't lock filename: $!";
truncate(FH, 0)
or die "can't truncate filename: $!";
# now write to FH
But am not sure about the die() function. Am I right in thinking that this
will cause the script to effectively 'quit' and present the user with the
error message? Is it possible/a good idea to just have the script re-attempt
file access (maybe for a finite number of tries) until it succeeds? I've
also looked into using the warn() function, but wondered if I could possibly
put this into a function that referenced itself (with a delay of some sort?)
whenever an access error occured.
Am I missing the point? Also... am I right in thinking that *all* calls to a
particular file *must* use the same locking 'mechanism' in order for it to
be successful.
------------------------------
Date: Tue, 5 Jun 2001 10:44:27 +0100
From: "Muddy Cat" <muddycat@hotmail.com>
Subject: Re: locking files before writing data (?)
Message-Id: <thpafrrbvrsg33@corp.supernews.co.uk>
** many apologies if this post appears twice... my newsreader is being very
odd this morning.
Thanks for everyone's very useful input. I also managed to find some really
good info on locking in the FAQ, but there's still something I'm not clear
on. I'm looking at using the following code to get and exclusive lock on the
file I'm updating:
use 5.004;
use Fcntl qw(:DEFAULT :flock);
sysopen(FH, "filename", O_WRONLY | O_CREAT)
or die "can't open filename: $!";
flock(FH, LOCK_EX)
or die "can't lock filename: $!";
truncate(FH, 0)
or die "can't truncate filename: $!";
# now write to FH
But am not sure about the die() function. Am I right in thinking that this
will cause the script to effectively 'quit' and present the user with the
error message? Is it possible/a good idea to just have the script re-attempt
file access (maybe for a finite number of tries) until it succeeds? I've
also looked into using the warn() function, but wondered if I could possibly
put this into a function that referenced itself (with a delay of some sort?)
whenever an access error occured.
Am I missing the point? Also... am I right in thinking that *all* calls to a
particular file *must* use the same locking 'mechanism' in order for it to
be successful.
------------------------------
Date: Tue, 5 Jun 2001 10:47:30 +0100
From: "Muddy Cat" <muddycat@hotmail.com>
Subject: Re: locking files before writing data (?)
Message-Id: <thpajbjl4vm835@corp.supernews.co.uk>
Thanks for everyone's very useful input. I also managed to find some really
good info on locking in the FAQ, but there's still something I'm not clear
on. I'm looking at using the following code to get and exclusive lock on the
file I'm updating:
use 5.004;
use Fcntl qw(:DEFAULT :flock);
sysopen(FH, "filename", O_WRONLY | O_CREAT)
or die "can't open filename: $!";
flock(FH, LOCK_EX)
or die "can't lock filename: $!";
truncate(FH, 0)
or die "can't truncate filename: $!";
# now write to FH
But am not sure about the die() function. Am I right in thinking that this
will cause the script to effectively 'quit' and present the user with the
error message? Is it possible/a good idea to just have the script re-attempt
file access (maybe for a finite number of tries) until it succeeds? I've
also looked into using the warn() function, but wondered if I could possibly
put this into a function that referenced itself (with a delay of some sort?)
whenever an access error occured.
Am I missing the point? Also... am I right in thinking that *all* calls to a
particular file *must* use the same locking 'mechanism' in order for it to
be successful.
------------------------------
Date: Tue, 5 Jun 2001 10:51:36 +0100
From: "Muddy Cat" <muddycat@hotmail.com>
Subject: Re: locking files before writing data (?)
Message-Id: <thpar14gu8a73c@corp.supernews.co.uk>
** many apologies if this post appears twice (or more!)... my newsreader is
being very
odd this morning.
Thanks for everyone's very useful input. I also managed to find some really
good info on locking in the FAQ, but there's still something I'm not clear
on. I'm looking at using the following code to get and exclusive lock on the
file I'm updating:
use 5.004;
use Fcntl qw(:DEFAULT :flock);
sysopen(FH, "filename", O_WRONLY | O_CREAT)
or die "can't open filename: $!";
flock(FH, LOCK_EX)
or die "can't lock filename: $!";
truncate(FH, 0)
or die "can't truncate filename: $!";
# now write to FH
But am not sure about the die() function. Am I right in thinking that this
will cause the script to effectively 'quit' and present the user with the
error message? Is it possible/a good idea to just have the script re-attempt
file access (maybe for a finite number of tries) until it succeeds? I've
also looked into using the warn() function, but wondered if I could possibly
put this into a function that referenced itself (with a delay of some sort?)
whenever an access error occured.
Am I missing the point? Also... am I right in thinking that *all* calls to a
particular file *must* use the same locking 'mechanism' in order for it to
be successful.
------------------------------
Date: Tue, 5 Jun 2001 09:52:32 +0000 (UTC)
From: Elias_Haddad@tertio.com (Elias_Haddad)
Subject: Net::SNMP question
Message-Id: <OF6CD92AE6.30EC06F1-ON80256A62.0036EB6E@LocalDomain>
Hi all,
I do realise this might be a question for the comp.lang.perl.modules group,
but there might be a way around my problem before getting to use the
module, hence my posting here.
I'm using the Net::SNMP module to make some SNMP queries.
One of the mibs that I'm using in a set_request command requires
an octetstringhex type as value.
However this type does not seem to be present in the module. The closest
I could find was octetstring which does not work when I use it.
Any suggestions?
for your info, the mib I'm using is the cisco ping mib and the hexadecimal
value is the IP address of a router converted to hexadecimal form.
Thanks a lot,
Elias.
Tertio Limited - One Angel Square, Torrens Street, London EC1V 1PL
Tel: +44 (0)20 7843 4000 Fax: +44 (0)20 7843 4001 Web http://www.tertio.com
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of Tertio
Ltd.
--
Posted from [212.250.216.229]
via Mailgate.ORG Server - http://www.Mailgate.ORG
------------------------------
Date: Tue, 5 Jun 2001 08:35:42 -0400
From: "Kevin Kirwan" <kkirwan@emory.edu>
Subject: Newbie guide
Message-Id: <9fijmp$n35$1@lendl.cc.emory.edu>
All,
I'm just starting out learning PERL. Anyone have any suggestions as to
"how-to" guides, or web-tutorials that would help an old ksh script hack
learn PERL?
Thanks in advance for any help,
Kevin Kirwan
------------------------------
Date: 5 Jun 2001 11:14:02 GMT
From: rachel@lspace.org (Rachel Coleman)
Subject: Re: OT :: What to do if you've been kill filed
Message-Id: <slrn9hpfnq.dd0.rachel@colon.hist.cam.ac.uk>
On Mon, 04 Jun 2001 17:40:57 -0400, Lou Moran <lmoran@wtsg.com> wrote:
>--So let's say you get kill filed what do you do to be un kill filed?
That really depends on the individual who decided to killfile you, and
what 'killfiling' means to them - all of your posts and followups to them
forever? or just your posts? or just for a period of time? or just with
certain keywords?
I think you also have to look at why you were killfiled and why that
bothers you. Why do you want a particular person to read your posts? What
did they find unacceptable about your posts? Does this seem a widespread
opinion on the newsgroup? Is it a big deal to change?
Just because one person makes a public announcement of killfiling you
doesn't mean no-one is ever going to read your posts. You can still get
involved in discussions with other people on here. If you care about
getting un-killfiled, then learn the lesson that person was trying to
teach you, and show that you have learned it.
There are enough clues every day (even to a beginner like me) as to what
is and is not found acceptable by many regular contributors to the group.
You have to decide if you care about what you write being seen by them,
and behave accordingly.
Best wishes,
Rachel
------------------------------
Date: 5 Jun 2001 12:15:44 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: OT :: What to do if you've been kill filed
Message-Id: <9fiihg$crt$1@mamenchi.zrz.TU-Berlin.DE>
According to Rachel Coleman <rachel@lspace.org>:
> On Mon, 04 Jun 2001 17:40:57 -0400, Lou Moran <lmoran@wtsg.com> wrote:
> >--So let's say you get kill filed what do you do to be un kill filed?
[good explanation of killfiling]
> There are enough clues every day (even to a beginner like me) as to what
> is and is not found acceptable by many regular contributors to the group.
> You have to decide if you care about what you write being seen by them,
> and behave accordingly.
A sober and realistic assessment of killfiling. Thanks for posting.
Anno
------------------------------
Date: Tue, 05 Jun 2001 10:22:14 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Perl Dummy!
Message-Id: <3B1CB2D6.4F69FDD0@acm.org>
KayKay wrote:
>
> Hi All,
>
> I am a Perl dummy, no nothing about Perl! :-).
> I got this little function in Perl below. Could anyone please help me to
> translate it into plan English or to other languages such C, C++, Java or VB
> that would very much appreciated!
__PERL__
my @checkTable = ( 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 );
sub cardCheck {
my @digits = reverse split //, shift;
my $sum;
my $mult = 1;
$sum += ($mult = !$mult) ? $checkTable[ $_ ] : $_ for @digits;
# $sum now contains the check sum. We simply need to make sure that
# it is a multiple of 10.
return 1 if $sum % 10;
return 0;
}
__C__
int checkTable[] = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 };
int cardCheck( const char *card ) {
int sum = 0;
int mult = 1;
int len = strlen( card );
while ( --len + 1 ) {
sum += (mult = !mult) ? checkTable[ card[ len ] - 0x30 ] : card[
len ] - 0x30;
}
/* sum now contains the check sum. We simply need to make sure that
*/
/* it is a multiple of 10. */
if ( sum % 10 ) return 1;
return 0;
}
John
--
use Perl;
program
fulfillment
------------------------------
Date: Tue, 05 Jun 2001 12:49:29 +0100
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: perl/cgi and dynamic hyperlink
Message-Id: <3B1CC749.4CD3A377@bigfoot.com>
"Godzilla!" wrote:
> You are surprised I have an attitude in view of all the
> crass remarks, insults and such directed at me, daily,
> by regulars here.
Since you stay, you must like it?
--
Thorbjørn Ravn Andersen "...plus...Tubular Bells!"
http://bigfoot.com/~thunderbear
------------------------------
Date: Tue, 05 Jun 2001 05:22:03 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: perl/cgi and dynamic hyperlink
Message-Id: <3B1CCEEB.8489D3BF@stomp.stomp.tokyo>
Thorbjørn Ravn Andersen wrote:
> Godzilla! wrote:
> > You are surprised I have an attitude in view of all the
> > crass remarks, insults and such directed at me, daily,
> > by regulars here.
> Since you stay, you must like it?
There is a sufficient number of blithering idiots,
such as yourself, running loose within this group
engaging in antidotal idiocy to provide a bit of
comical relief for an intellect such as I.
Godzilla!
------------------------------
Date: Tue, 05 Jun 2001 02:19:00 -0700
From: johnca@DIESPAMmac.com (John Abbe)
Subject: PYML, Python, Perl and Zope
Message-Id: <johnca-0506010219000001@nop009.transbay.net>
PYML looks very neat for web delivery (Python embedded in HTML).
http://www.pyml.org/
With Python 2.1 does it still need the SGML thing?
Is there anything like it for Perl?
----
Zope looks neat, too.
Zope uses DHTML, right? Is anyone using it with PYML?
and how is Zope for coding in languages other than Python? (e.g., Perl)
Thanks...
John
--
The links i wish i had the first week i got OS X:
http://www.ourpla.net/guiunix/GettingXGoing.html
------------------------------
Date: Tue, 5 Jun 2001 12:12:55 +0200
From: "Anders Hanssen" <andersh@nextramobile.com>
Subject: Re: PYML, Python, Perl and Zope
Message-Id: <6g2T6.5360$vu4.530477@news3.oke.nextra.no>
"John Abbe" <johnca@DIESPAMmac.com> wrote:
> Zope uses DHTML, right? Is anyone using it with PYML?
Zope use DTML:
http://www.zope.org/Documentation/Guides/DTML-HTML/
--
\anders
------------------------------
Date: Tue, 05 Jun 2001 11:50:40 GMT
From: PropART <temp1@williamc.com>
Subject: Re: PYML, Python, Perl and Zope
Message-Id: <3B1CC75E.8859AF48@williamc.com>
John Abbe wrote:
>
> PYML looks very neat for web delivery (Python embedded in HTML).
> Is there anything like it for Perl?
>
Well, especially if you run mod_perl, I'd suggest checking out
embperl, HTML Template and HTML Mason... I'm evaluating Template and
Mason right now. Template (a very simple "let's do one thing and do it
well", kind of deal) turned out to be perfect for a web reporting app
that I'm working on... Mason and embperl are said to be full-featured
enough to be an alternative to an app server like Zope.
Overview by the modules' authors and links etc. at
http://www.perlmonth.com/features/template/template.html?issue=11
Also, see...
http://www.perl.com/pub/2001/03/embperl.html
--williamc
------------------------------
Date: Tue, 5 Jun 2001 15:52:11 +0800
From: Murlimanohar Ravi <eng80956@nus.edu.sg>
Subject: thank you
Message-Id: <191C91BDFE8ED411B84400805FBE794C113E3587@pfs21.ex.nus.edu.sg>
Hi everyone,
Thank you all for your suggestions though I'm not sure how successful
I'm going to be when it comes to implementation! My knowledge of SQL, VB
etc is negligible. Guess I was asking for too much... :) Have to
struggle through loads of documentation now, I suppose!
Thanks again.
Cheers,
Murli.
-----Original Message-----
From: Stuart Gall
Posted At: 6/4/01 8:25 PM
Conversation: using perl with msaccess
Subject: Re: using perl with msaccess
>
> Er... hello? I have DONE appending and updating to tables, with
Access,
> through DBI + DBD::ODBC. So I'm 100% sure it works.
>
Oh! Sorry. Is this Access97?
Now I think about it I was probably doing SQL through DDE, which does
not
allow SQL update and Append.
--
Stuart Gall
------------------------------------------------
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 1060
***************************************