[13250] in Perl-Users-Digest
Perl-Users Digest, Issue: 660 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 27 06:07:25 1999
Date: Fri, 27 Aug 1999 03: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)
Perl-Users Digest Fri, 27 Aug 1999 Volume: 9 Number: 660
Today's topics:
Re: Amsterdam Perl Mongers Meeting (Hans Paijmans)
Re: Call subroutines in an IF statement? (Bart Lateur)
cc:Mail Technical Support Engineers wanted <dannywong@hknet.com>
Re: cc:Mail Technical Support Engineers wanted (Abigail)
Re: cc:Mail Technical Support Engineers wanted <wyzelli@yahoo.com>
Re: Checking for multiple spaces <kin@0011.com>
Re: Collect Information in DB or text file? (Bart Lateur)
DBD-ODBC <f.agolli@studenti.to.it>
Re: DBD-ODBC <eyounes@aol.com>
Re: Desperately searching for perl lint (Bart Lateur)
Newbie RegEx question <dbennett@hsstelford.freeserve.co.uk>
Re: Newbie RegEx question (Steffen Koehler)
Re: Pattern Matching (Bart Lateur)
PERL access Serial port? <cyinc@singnet.com.sg>
Re: PERL access Serial port? <meowing@banet.net>
Re: Perl Y2K Bugs on the Internet (Bart Lateur)
Re: Perl Y2K Bugs on the Internet <gellyfish@gellyfish.com>
Re: PHP/mySQL problem <meowing@banet.net>
Please help me kalakala@my-deja.com
Re: Please help me <kin@0011.com>
Re: Programmers Needed <wyzelli@yahoo.com>
Project Manager wanted <dannywong@hknet.com>
Re: recovering the query string while using CGI.pm gmahler@my-deja.com
Re: Regexp bug or what? (Bart Lateur)
SEARCH FOR REGX IN MANY FILES ? tvn007@my-deja.com
Re: Security on files in WINNT <peterw@innate.co.uk>
Re: Security on files in WINNT <peterw@innate.co.uk>
Re: setuid <cthoma@evonet.de>
Re: The extent of double-quotish interpolation (Bart Lateur)
Re: Visibility of inlined subs (Bart Lateur)
Re: Why use Python when we've got Perl? (C.Laurence Gonsalves)
Re: Win32 OLE VB -> Perl question: Arrays? <ter@my-deja.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 27 Aug 1999 07:52:53 GMT
From: paai@kub.nl (Hans Paijmans)
Subject: Re: Amsterdam Perl Mongers Meeting
Message-Id: <slrn7scgh8.i21.paai@pi0959.kub.nl>
On 26 Aug 1999 19:07:04 GMT, Robert Jan <rj@NOT4MAIL.xs4all.nl> wrote:
>
>[English version follows the dutch text]
>
>Amsterdam.pm staat voor de "Amsterdamse Perl Mongers", een groep van
Hoe mong je eigenlijk een perl?
--
Drs Hans Paijmans
KUB-University Tilburg, Netherlands (+31) (0)13-4662693
Home: Elzenstraat 1, 5581 VS Waalre, Netherlands (+31) (0)40-2230680
http://pi0959.kub.nl/paai.html http://purl.oclc.org/NET/PAAI/
------------------------------
Date: Fri, 27 Aug 1999 09:07:05 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Call subroutines in an IF statement?
Message-Id: <37d14d7f.6854585@news.skynet.be>
"willow" wrote:
>I keep getting syntax errors with the following:
>
>if ($0 = "RIPS_EARNED_MPS".* ) {
Two errors. "=" is for assignment. And what's that ".*" following the
RHS?
if($0 eq "RIPS_EARNED_MPS") { ... # literal match
or
if($0 =~ /^RIPS_EARNED_MPS/) { ... # regex, "starts with..."
Bart.
------------------------------
Date: Fri, 27 Aug 1999 15:15:31 +0800
From: "Danny Wong" <dannywong@hknet.com>
Subject: cc:Mail Technical Support Engineers wanted
Message-Id: <37c63aab@ruby.hknet.com>
We are a Network Consultancy Company in Central and have vacancies for the
following posts:
1. Senior cc:Mail/Lotus Notes Technical Support Enginner(Full Time) - Ref:
TI004F
----------------------------------------------------------------------------
----------------------
-- Dip. or equivalent in Computer Study or Information Technology.
-- 3 yrs. solid technical support experience in cc:Mail system and Lotus
Notes.
-- In-depth Knowledge in cc:Mail and Lotus Notes.
-- Familiar with the following areas will be an asset:
Groupwise and MS Exchange server.
-- Certified Lotus Notes Professional (CLP) holder is prefered.
-- Responsible for on-site technical support for cc:Mail Lotus Notes system.
2. cc:Mail Technical Support Enginner(Full Time) - Ref: TI005F
---------------------------------------------------------------------------
-- TI or equivalent in Computer Study or Information Technology.
-- 1 yrs. solid technical support experience in cc:Mail system.
-- Knowledgeable in cc:Mail installation, setup, upgrade and migration.
-- Familiar with the following areas will be an asset:
Lotus Notes, Groupwise and MS Exchange server.
-- Responsible for on-site technical support for cc:Mail system
3. Service Hot-Line Technical Support Enginner(Full Time) - Ref: TI006F
----------------------------------------------------------------------------
-----------
-- TI or equivalent in Computer Study or Information Technology.
-- 1 yrs. service hot-line technical support experience in Micosoft Office
products.
-- Knowledgeable in Microsoft Office application and usage.
-- Familiar with the following areas will be an asset:
MS Win95/98, NT, Novell and Lotus products
-- Responsible for service hot-line technical support for MS Office product.
For job application, please fax your resume (with expected salary & date of
avaliable) to 2580-3976 or email to dannywong@hknet.com
------------------------------
Date: 27 Aug 1999 02:24:09 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: cc:Mail Technical Support Engineers wanted
Message-Id: <slrn7scfed.bc.abigail@alexandra.delanet.com>
Danny Wong (dannywong@hknet.com) wrote on MMCLXXXVII September MCMXCIII
in <URL:news:37c63aab@ruby.hknet.com>:
?? We are a Network Consultancy Company in Central and have vacancies for the
?? following posts:
1. Senior map reader, who can figure out in which town we are central in.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Fri, 27 Aug 1999 19:03:55 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: cc:Mail Technical Support Engineers wanted
Message-Id: <7Ysx3.2$fV4.781@vic.nntp.telstra.net>
Abigail <abigail@delanet.com> wrote in message
news:slrn7scfed.bc.abigail@alexandra.delanet.com...
> Danny Wong (dannywong@hknet.com) wrote on MMCLXXXVII September MCMXCIII
> in <URL:news:37c63aab@ruby.hknet.com>:
> ?? We are a Network Consultancy Company in Central and have vacancies for
the
> ?? following posts:
>
>
> 1. Senior map reader, who can figure out in which town we are central in.
>
>
>
> Abigail
1. Brain to figure out this is not a job vacancy column
Wyzelli
------------------------------
Date: Fri, 27 Aug 1999 02:00:30 -0700
From: Kin Lum <kin@0011.com>
Subject: Re: Checking for multiple spaces
Message-Id: <37C653AE.E7578C07@0011.com>
Mike wrote:
>
> ok, how do you check to make sure the first character or last character isn't a
> space?
#!/usr/local/bin/perl
try("ha");
try(" ha");
try("ha ");
try("ha\t");
sub try {
$v = shift;
if ($v =~ /^\s|\s$/) {
print "yeah dude '$v'\n";
}
}
you probably would like to check out
http://www.0011.com/books/perl
for the regular expression reference.
------------------------------
Date: Fri, 27 Aug 1999 09:07:02 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Collect Information in DB or text file?
Message-Id: <37d04cc4.6667510@news.skynet.be>
Konrad Mathieu wrote:
>I need to collect E-mail adresses submitted by an html form in either a DB
>or a text file. Is this an easy task and how could I start (I'm quite a
>novice)?
It can be easy.
open(FILE,">>/path/to/emails.txt"); # or die...
flock FILE, 2; # on Unix
print FILE, "$form{email}\n";
close FILE;
This will append the currently supplied value to a textfile, one address
per line.
Bart.
------------------------------
Date: Fri, 27 Aug 1999 10:31:59 +0200
From: "Fredi Agolli" <f.agolli@studenti.to.it>
Subject: DBD-ODBC
Message-Id: <7q5j0q$537$3@menelao.polito.it>
Hi to everybody,
l have to manage DB ACCESS from a Linux machine so, l'm trying to install
DBD-ODBC-0.20 module ( l've just installed DBI-1.02 module).
Running 'perl Makefile.PL' compares the messagge
' You need to indicate where your ODBC Driver Manager is installed '.
Running 'perl Makefile.PL -o odbcdir' compares 'ODBCHOME environment
variable odbchome does not refer to a directory'.
l use Perl 5.005_03 built for i386 linux.
The Microsoft ODBC Driver Manager is installed in c:\windows\system.
How can l pass this information to my perl module ?
Thank's in advance
Fredi
------------------------------
Date: Fri, 27 Aug 1999 11:58:25 +0200
From: "Ysteric's" <eyounes@aol.com>
Subject: Re: DBD-ODBC
Message-Id: <7q5nbk$dii@news.vtcom.fr>
>The Microsoft ODBC Driver Manager is installed in c:\windows\system.
>How can l pass this information to my perl module ?
>
>Thank's in advance
>
>Fredi
I think it's impossible.
2 solutions:
-find an ODBC manager on Linux
or
-move to a windows webserver
Eric
------------------------------
Date: Fri, 27 Aug 1999 09:06:56 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Desperately searching for perl lint
Message-Id: <37ca3da1.2792936@news.skynet.be>
T. Alex Beamish wrote:
>Here's one thing that pops to mind: telling me that a variable that
>I've declared is not used. Great for cleaning up variables that were
>used in a previous version of the code.
Does the warning "Name "$foo" used only once: possible typo" mean
anything to you?
It's part of standard Perl, assuming you enable -w.
Bart.
------------------------------
Date: 27 Aug 1999 08:40:58 GMT
From: "Doug Bennett" <dbennett@hsstelford.freeserve.co.uk>
Subject: Newbie RegEx question
Message-Id: <01bef067$7104f2c0$0e03883e@doug-bennet>
I want to check whether a string includes the characters:
tsj
in it. I want this to be true only if the characters appear in that order,
eg
"this joint" would return true, whereas
"short jump" would return false even though the three characters appear in
this phrase.
The check should be case insensitive.
Could someone help me with the expression for this. Thanks
------------------------------
Date: 27 Aug 1999 09:01:57 GMT
From: msk@uni-jena.de (Steffen Koehler)
Subject: Re: Newbie RegEx question
Message-Id: <7q5k65$n5a$1@fsuj19.rz.uni-jena.de>
Doug Bennett (dbennett@hsstelford.freeserve.co.uk) wrote:
man perlre
but for this time use /t.*s.*j/
bye Steffen
: I want to check whether a string includes the characters:
: tsj
: in it. I want this to be true only if the characters appear in that order,
: eg
: "this joint" would return true, whereas
: "short jump" would return false even though the three characters appear in
: this phrase.
: The check should be case insensitive.
:
: Could someone help me with the expression for this. Thanks
------------------------------
Date: Fri, 27 Aug 1999 09:06:53 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Pattern Matching
Message-Id: <37c93a4b.1938522@news.skynet.be>
Andy Molnar wrote:
>How do use pattern matching to check only the last character of a
>string? I'm passing a value with a period at the end, which seems to
>screw up at the destination. (Such as "Washington D.C.").
It's not the fact that it's the last character that matters. It's the
fact that the dot is a special character for regexes, AKA "meta
characters". The dot means "any character but a newline".
There's a special function, called "quotemeta", which makes all
contained meta characters harmless. It does this by putting a backslash
in front of them. A backslash means "take the next character literally",
except when it's a digit or a letter in regexes; but digits and letters
cannot be meta characters, so that's allright. On the contrary: a
backslash followed by a letter and or a digit is special in regexes.
You can even use the quotemeta() mechaism directly inside a regex, by
including "\Q" (quotemeta) before, and "\E" (end ) after your included
pattern (which may contain variables). An example:
$_ = "your text here";
$pattern = "Washington D.C.";
if(/\Q$pattern\E/) {
print "Found Washington!\n";
} else {
print "Nope.\n";
}
Oh, and if you still want to check the final character on the line
(ignoring an optional terminating newline), use "$", which means "end of
string".
if($pattern =~ /\.$/) {
print "The pattern \"$pattern\" ends with a dot.\n";
}
HTH,
Bart.
------------------------------
Date: Fri, 27 Aug 1999 16:01:29 +0800
From: "CYBERINC" <cyinc@singnet.com.sg>
Subject: PERL access Serial port?
Message-Id: <7q5gjp$rgh$1@mango.singnet.com.sg>
Hi Hi!
I am a fresh newbie to perl. And I do not have time to get warm up before
jumping into perl+IO.
I saw the IO lib. My q:
1) Can I make a cgi and with a click of a button access client's serial
port?
2) I need the headers for GET & POST sent to client browser.
Is there any way I can modify the header on the fly?
I hope my qs make sense. >:-p
Thks a million.
*perl-dino*
------------------------------
Date: 27 Aug 1999 04:38:44 -0400
From: meow <meowing@banet.net>
Subject: Re: PERL access Serial port?
Message-Id: <87aerd62jv.fsf@slip-32-100-243-13.ma.us.ibm.net>
CYBERINC <cyinc@singnet.com.sg> wrote:
> I am a fresh newbie to perl. And I do not have time to get warm up
> before jumping into perl+IO.
You'll need to make some time then. For starters, read the serial
port stuff in perlfaq8.
> I saw the IO lib. My q:
> 1) Can I make a cgi and with a click of a button access client's serial
> port?
The client's serial port? Through CGI? No, not unless the browser
has some serious security holes.
If you've got a good reason to do something like that, you'll have to
write a program that runs on the client's machine and ask them to run
it. Perl probably isn't what you want for that job.
> 2) I need the headers for GET & POST sent to client browser.
> Is there any way I can modify the header on the fly?
See the CGI module. It's all in there.
> I hope my qs make sense. >:-p
------------------------------
Date: Fri, 27 Aug 1999 09:07:08 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl Y2K Bugs on the Internet
Message-Id: <37d45046.7566248@news.skynet.be>
Luis E. Rodriguez wrote:
>Any comments?
Apart from the crossposting (;-), you got it.
And the optimists expect unix to use 64 bit timestamps by the time it
becomes too relevant (was it 2038, or 2034?), while still maintaining
backward compatibility for the programmer.
Bart.
------------------------------
Date: 27 Aug 1999 11:01:53 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Y2K Bugs on the Internet
Message-Id: <37c66211_2@newsread3.dircon.co.uk>
In comp.lang.perl.misc finsol@ts.co.nz wrote:
> This posting relates to C/C++, Java and Javascript developers, but is of
> particular interest to those developing in Perl.
>
It appears that Ms Amon has some particular animus toward Perl as a
programming language. For those in newsgroups that have less experience
of this persistent individual might like to see for instance the thread:
<http://x21.deja.com/[ST_rn=ap]/viewthread.xp?AN=481002103&search=thread>
> Perl developers who are unaware that it is possible to create Y2K bugs
> in Perl applications may be interested in my article published August
> 1999 regarding the finding of numerous Y2K bugs in Perl, Java,
> Javascript and C/C++ in code published on the internet and buried within
> web pages.
>
> This article is available at URL:
> http://www.y2kinfo.com/journal/features/0899_amon.html
>
This article rehashes material that has been gone over time and time again
in similar articles by Ms Amon and also in a multitude of threads in
comp.lang.perl.misc and no doubt all of the other groups to which this
article has been posted.
> The article links through to over 300 web pages that contain Y2K bugged
> code - the vast majority of them in Perl. The most common problem is
> hardcoded 19's but there are also 70 on-line examples of the booby trap
> code problem which affects all the above languages.
> To go directly to these on-line examples, the URL is:
> http://www.ts.co.nz/~finsol/y2k_examples.htm
>
It would appear that the majority of the instances that are cited are the
direct production of one Matt Wright - whose code has been subject to wide
criticism in comp.lang.perl.misc and elsewhere for a while now. The majority
of *this* code is likely to fail under a wide range of circumstances of
which century change is probably the least fatal to the application. Not
one of these programs will cease to work as a result of Wrights failure
to read the documentation for the localtime function - even if their failure
was a cause of concern - and I know he has failed to read rather than failed
to understand the documentation because in some of his emanations (e.g. the
free for all link script) he has actually bypassed localtime altogether and
used the Unix 'date' command.
Of course it would be unfair to single out Matt Wright - he is just the
most hallowed in the Script Kiddies pantheon.
Regulars of comp.lang.perl.misc will no doubt be familiar with this
snippet (taken from
<http://busboy.sped.ukans.edu/~rpal/cgi-scripts/guestbook/guestbook_code.html>)
which is nearly ubiquitous in scripts of this type:
sub date_time {
### The local time at the server
@months = ('January','February','March','April','May','June','July',
'August','September','October','November','December');
@days = ('Sunday','Monday','Tuesday','Wednesday','Thursday',
'Friday','Saturday');
($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
if ($sec < 10) { $sec = "0$sec"; }
if ($min < 10) { $min = "0$min"; }
if ($hour < 10) { $hour = "0$hour"; }
if ($mday < 10) { $mday = "0$mday"; }
$DATE = "$months[$mon] $mday, 19$year ($hour:$min:$sec)";
}
Of course the abuse of localtime[5] is not the only stupid thing about
this code - but this is only one sympton of a plague of bad programming.
All of the examples that you cite are demonstrably bad programs in many
ways that you have chosen to ignore - that of course would go without
saying as you have set yourself up as a 'Y2K Consultant' - I would be
cheered if, after the new year, your turned your zeal to trying to persuade
the Script Kiddies to check the success of open(),use CGI.pm, use -w ....
You seem to cite these instances of inept programming as being indicative of
some problem with the languages they are written in. Whereas most rational
people would see them for what they are - the emanations of inept
programmers.
> It would appear that the Y2K message is still not getting through to
> many programmers.
The problem I have with this statement is that the majority of examples
that you provide could only be marginally described as programmers - we
have discussed this before in one of the previous threads that you have
inspired.
> For Perl developers, part of the reason maybe that
> whenever the subject is raised within the Perl newsgroup the response is
> often abuse, denial or a belittling of the person making the query.
> Often they are told to read the FAQ which offers minimal information on
> the topic.
I will quote that FAQ:
Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Short answer: No, Perl does not have a Year 2000 problem. Yes, Perl is
Y2K compliant (whatever that means). The programmers you've hired to
use it, however, probably are not.
Long answer: The question belies a true understanding of the issue. Perl
is just as Y2K compliant as your pencil--no more, and no less. Can you
use your pencil to write a non-Y2K-compliant memo? Of course you can. Is
that the pencil's fault? Of course it isn't.
The date and time functions supplied with perl (gmtime and localtime)
supply adequate information to determine the year well beyond 2000 (2038
is when trouble strikes for 32-bit machines). The year returned by these
functions when used in an array context is the year minus 1900. For years
between 1910 and 1999 this happens to be a 2-digit decimal number. To
avoid the year 2000 problem simply do not treat the year as a 2-digit
number. It isn't.
When gmtime() and localtime() are used in scalar context they return
a timestamp string that contains a fully-expanded year. For example,
$timestamp = gmtime(1005613200) sets $timestamp to ``Tue Nov 13 01:00:00
2001''. There's no year 2000 problem here.
That doesn't mean that Perl can't be used to create non-Y2K compliant
programs. It can. But so can your pencil. It's the fault of the user,
not the language. At the risk of inflaming the NRA: ``Perl doesn't
break Y2K, people do.'' See http://language.perl.com/news/y2k.html for
a longer exposition.
I think that's pretty explicit and far from offering minimal information
makes it quite clear as to where the 'Y2K' problem lies - between the ears
of the person using the language: this is not the fault of the language.
> An intelligent newsgroup debate on the topic would do more
> in enlightening programmers who have yet to discover that their
> applications need to be checked for Y2K bugs.
>
I agree, but for reasons that I am sure you wont enjoy - I have left the
crosspost standing as I for one am very interested in the rebuttals that
the programmers of Java,C etc will come up with ...
By the way I dont think it does your cause much good if you cant distinguish
Perl from C:
14.
C/C++ (HC)
Apr 1999 http://cgi.dol.ru/readme/counter.html
$date = "@months[$mon] $mday, 19$year";
that is just the first example - there are more than than a dozen (when I
gave up counting). It would also behove you to learn to distinguish
between C & C++ and learn that there is no language as C/C++.
/J\
--
"They're called Virgin Trains because they don't go all the way" -
Simon Hoggart, The Guardian
------------------------------
Date: 27 Aug 1999 03:38:08 -0400
From: meow <meowing@banet.net>
Subject: Re: PHP/mySQL problem
Message-Id: <87emgp65cv.fsf@slip-32-100-243-13.ma.us.ibm.net>
In comp.lang.perl.misc, Sreshth Kumar <skumar@deutech.com> wrote:
> I know this is a Perl newsgroup but some of you may have used PHP
> and could help me out on this.
I'll bet you can find people who've used PHP in rec.toys.lego too.
> You can use PHP to read data from a MySQL database, but can PHP be also used
> to write data into a MySQL database (say contents of a Web form) ?
Of course.
> If so, how?
It's in the manual.
> Thanks in advance for your help.
You're welcome.
------------------------------
Date: Fri, 27 Aug 1999 07:28:18 GMT
From: kalakala@my-deja.com
Subject: Please help me
Message-Id: <7q5emb$3gt$1@nnrp1.deja.com>
Hello sir,
I want to create a file in my dir using CGI-PERL.
I want to give the name of the file and the content from the web ie
thru'
html.
The perl-cgi program the one which i've is nicely run from the prompt
but
if i call from the html form element by giving the action=file.cgi,it
doesn't create the output file.
How can i create the output file via web?.
If i get the reply,it'll be verymuch useful.
Thanks in advance.
-kala
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 27 Aug 1999 02:43:48 -0700
From: Kin Lum <kin@0011.com>
Subject: Re: Please help me
Message-Id: <37C65DD4.F1E2BE6@0011.com>
kalakala@my-deja.com wrote:
> if i call from the html form element by giving the action=file.cgi,it
> doesn't create the output file.
>
> How can i create the output file via web?
I suspect what is missing in your Perl program is
the line
print "Content-type: text/html\n\n";
print "Hello world\n";
(must be two \n in the first line)
you need that to finish the HTTP header info.
check out http://www.0011.com/books/perl
for the book
Perl and Cgi for the World Wide Web: Visual Quickstart
Guide
it would be an excellent and quick tutorial book
to get you started.
------------------------------
Date: Fri, 27 Aug 1999 19:09:00 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Programmers Needed
Message-Id: <D5tx3.3$fV4.686@vic.nntp.telstra.net>
Abigail <abigail@delanet.com> wrote in message
news:slrn7sb5n4.n0r.abigail@alexandra.delanet.com...
> www@www.com (www@www.com) wrote on MMCLXXXVI September MCMXCIII in
> ^^^^^^^
> <URL:news:ifgx3.113$DO2.3631@news.corecomm.net>:
> `` Looking for web designer and programmers in the Chicago area or
Southwest
> `` suburbs. If interested, please contact ybid@orbitel.com
> ^^^^^^^^^^^
>
>
> www.com is located in California, orbitel.com is located in Illinios.
> You claim to be interested in people in Chicago.
>
> Hmmm.
>
> Why should I believe you aren't trying to pull some scam?
>
>
>
> Abigail
Can't believe you've never heard of telecommuting Abigail?
Wyzelli
TIC
------------------------------
Date: Fri, 27 Aug 1999 15:27:10 +0800
From: "Danny Wong" <dannywong@hknet.com>
Subject: Project Manager wanted
Message-Id: <37c63d64@ruby.hknet.com>
We are a Network Consultancy Company in Central and have vacancy for the
following post:
1. Project Manager (Full Time) - Ref: TI007F
----------------------------------------------------------------------------
-----------
-- University graduate or equivalent in Computer Science or Information
Technolgy.
-- 3 years solid experience in managing computer network implementation
project.
-- Knowledgeable in computer networking implementation
-- Responsible for managing computer network implementation project.
For job application, please fax your resume (with expected salary & date of
avaliable) to 2580-3976 or email to dannywong@hknet.com
------------------------------
Date: Fri, 27 Aug 1999 08:00:54 GMT
From: gmahler@my-deja.com
Subject: Re: recovering the query string while using CGI.pm
Message-Id: <7q5gjh$4mv$1@nnrp1.deja.com>
In article <37C43C09.FA16BB88@vpservices.com>,
Jeff Zucker <jeff@vpservices.com> wrote:
> gmahler@my-deja.com wrote:
> >
> > In article <37C083DD.9FBD1373@vpservices.com>,
> > Jeff Zucker <jeff@vpservices.com> wrote:
> > >
> > > #!/usr/local/bin/perl -wT
> > > use strict;
> > > use CGI qw(:standard);
> > > my $x = query_string() || '';
> > > print header, "[$x]";
> > >
> >
> > When I try the above code, I get an error:
> >
> > Can't call method "param" without a package or
> > object reference at (eval 2) line 4.
>
> I doubt you get that message from that code since that code doesn't
call
> the method param. If you really do get that error message from that
> exact code, what version of CGI.pm are you using?
I totally understand your incredulity (is that a word?),
but alas, it is true. Here's what I get when I type
"perl -v" :
This is perl, version 5.003 with EMBED
built under solaris at Jul 15 1996 18:24:47
+ suidperl security patch
Copyright 1987-1996, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5.0 source
kit.
>
[snip]
> If you were to write the exact same thing as the
> function-oriented code cited above using CGI objects instead of
> functions, it would look like this:
>
> #!/usr/local/bin/perl -wT
> use strict;
> use CGI;
> my $x = new CGI;
> print $x->header(),
> "[",
> $x->query_string(),
> "]",
> ;
Actually, Jeff, this code works on my system! You are the MAN!
You are THE MAN! Thank you, brother. I tried something like this
earlier, but I didn't use the "my" qualifier, so things didn't work,
and I didn't know why. I have lots to learn here. Anyway, I have no
idea why the code at the top doesn't work, but I guess it wouldn't be
all that unreasonable if my implementation of query_string() calls the
param() function, not that I care to look at the source code.
Greg
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 27 Aug 1999 09:06:58 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Regexp bug or what?
Message-Id: <37cc471f.5222928@news.skynet.be>
Thierry METOUDI wrote:
>Tell me more
Simple. Here it is again:
>$p = "999 yyyyyy";
>if ( $p=~/(\d+?)\s*?([A-Za-z]+?)/g ) {
> print "$1\t$2\n";
>}
>
>output:
>999 y
Since the "?" following the match says the regex to do minimal matching,
it will take as few letters as possible for a succesful match. That
number is 1. The remainder of the regex makes it impossible to use fewer
digits.
If there was one more thing (but not a letter) following, both in your
regex and the string, it would have "worked".
I can't see the reason why you'd want that "?" in "([A-Za-z]+?)" anyway.
Bart.
------------------------------
Date: Fri, 27 Aug 1999 07:49:42 GMT
From: tvn007@my-deja.com
Subject: SEARCH FOR REGX IN MANY FILES ?
Message-Id: <7q5fuk$490$1@nnrp1.deja.com>
Hello,
I am pretty new to perl, and would like to ask for help .
Would someone help me to come up with a better algorithm to solve
this problem ? or give me some hint ?
Here is the problem:
I would like to search for the follwing pattern in a file called FILE1
path_here(key1,xyz);
path_here(key2,mza);
path_here(key3,abe);
where key1,key2 and key3 could be any combination of letter and number.
Example:
key1 = ixy_p233_p3
key2 = yxz_pxda
key3 = daa_d32_33
Once you find key1, key2, and key3 in FILE1, you now then look for
key1, key2 and key3 in another file called FILE2.
define key1 template1
define key1 template2
define key1 templateX
define key2 templatey
define key2 template2
define key3 template1
if (key1 && template1) then
{ search for "hi_life"
print "key1 template1 hi_life
}
if (key1 && template2 ) then
{ search for "short_life"
print "key1 template2 short_life
}
..........
.........
Thanks in advance for your help,
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 27 Aug 1999 08:06:25 +0100
From: "Peter Wilkinson" <peterw@innate.co.uk>
Subject: Re: Security on files in WINNT
Message-Id: <935737918.20625.0.nnrp-07.9e983bf8@news.demon.co.uk>
Depends how you are running the perl script. If running from
a command prompt like
c:perl myscript.pl
it runs as the user running the script.
If running as a CGI script under IIS there are a couple of different
models. Here if the security model is 'anonymous login' or something
like that, then the scrip is run as the 'default anonymous web user' who's
identity can be set from IIS. If 'basic authentication' or 'NT
authentication'
are used then the script is run as the user who logged into the website.
Peter
Arjen Jansen <ajansen@glasshouse.nl> wrote in message
news:935736629.350987@cyperus.glasshouse.net...
> Hi,
>
> I got ActivePerl 5.1.9 installed on a WinNT 4.0 server. Now I have the
> problem that a perl script needs to write a file into a directory. And I
am
> not sure who or what kind of access to allow on that directory to make
this
> work.
>
> So far I have only been able to write into directories where everyone has
> full rights. You can imagine thats not what I want.
>
> I am wondering as what kind of user Perl accesses files.
>
> Anybody got any idea?
>
> Arjen Jansen
>
>
>
------------------------------
Date: Fri, 27 Aug 1999 08:25:32 +0100
From: "Peter Wilkinson" <peterw@innate.co.uk>
Subject: Re: Security on files in WINNT
Message-Id: <935738991.387.0.nnrp-13.9e983bf8@news.demon.co.uk>
Depends how you are running the perl script. If running from
a command prompt like
c:perl myscript.pl
it runs as the user running the script.
If running as a CGI script under IIS there are a couple of different
models. Here if the security model is 'anonymous login' or something
like that, then the scrip is run as the 'default anonymous web user' who's
identity can be set from IIS. If 'basic authentication' or 'NT
authentication'
are used then the script is run as the user who logged into the website.
regards
Peter
------------------------------
Date: Fri, 27 Aug 1999 10:22:06 +0200
From: Claudia Thoma <cthoma@evonet.de>
Subject: Re: setuid
Message-Id: <37C64AAE.C19877F2@evonet.de>
poocus@my-deja.com wrote:
>
> I'm new to perl so be gentle with me...
>
> I have a script that runs on a web server, the script uses a system call
> to run an external executable, it works fine from the command line, but
> not when executed via the web server, I think the problem is that the
> web ID via the web server has no permissiions to execute external
> executables, so, is it possible to set the user id to one with
> permissions, within the perl script in order to run the external
> executable. The external executable has the following permissions set:
> -rwxr-xr-x
> Anybody know how to fix this?
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
set the setuid or setgid-bits for your externel executable.
--
------------------------------
Date: Fri, 27 Aug 1999 09:07:00 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: The extent of double-quotish interpolation
Message-Id: <37cf4af5.6204822@news.skynet.be>
Abigail wrote:
>That suggests that Perl thinks it's a value, not a variable. man perldiag
>says this error occurs when you try to modify a constant; which is quite
>the opposite of a variable.
$_ = 'a string';
/(\w{2,})/;
print $1;
$1 = "nope";
So $1 is not a variable?
So what? ;-)
Bart.
------------------------------
Date: Fri, 27 Aug 1999 09:07:07 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Visibility of inlined subs
Message-Id: <37d24e52.7065771@news.skynet.be>
Paul Wood wrote:
>Some inlined subroutines are being included from a library file (into the
>main package), but they don't appear to be working correctly from outside of
>that file. Functions in that same file can use them fine, but anything else
>(even if I explicitly add the package name) uses the constant names as
>strings. If redefine them in each file, I still get the "Constant subroutne
>redefined" warning. Any ideas?
Either do "use" instead of "require", which makes the Perl compiler
allow a flexibler syntax (since it knows of the constants), or code your
constants as what they are: subroutine calls.
use constant PI => 4*atan2(1,1);
print PI();
Bart.
------------------------------
Date: Fri, 27 Aug 1999 07:29:22 GMT
From: clgonsal@keeshah.penguinpowered.com (C.Laurence Gonsalves)
Subject: Re: Why use Python when we've got Perl?
Message-Id: <slrn7scfi6.pa.clgonsal@keeshah.penguinpowered.com>
On 26 Aug 1999 10:33:03 -0500, Abigail <abigail@delanet.com> wrote:
> David Oppenheimer (davidopp@megsinet.net) wrote on MMCLXXXVI September
> MCMXCIII in <URL:news:37C552DF.9F90BA36@megsinet.net>:
> $$
> $$ That being said, are there ways to integrate Python and Perl to do things
> $$ that neither one can do alone?!
>
> Since Python and Perl are Turing equivalent, what things are you refering to?
Write a powerful and useful script that is both:
- easy to understand and maintain
- only 6 characters long
--
C. Laurence Gonsalves "Any sufficiently advanced
clgonsal@kami.com technology is indistinguishable
http://www.cryogen.com/clgonsal/ from magic." -- Arthur C. Clarke
------------------------------
Date: Fri, 27 Aug 1999 09:01:39 GMT
From: Tim Richardson <ter@my-deja.com>
Subject: Re: Win32 OLE VB -> Perl question: Arrays?
Message-Id: <7q5k5g$71m$1@nnrp1.deja.com>
And the answer is: use Perl arrays. Like so:
my $Book2 = $Excel->Workbooks->OpenText({
FileName=>"H:\\SAPWorkDir\\reverse.txt", ...,
FieldInfo=>[[1,2],[1,2]]});
--
Tim Richardson
(search string: qweeblebeast)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 660
*************************************