[16104] in Perl-Users-Digest
Perl-Users Digest, Issue: 3516 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 29 21:05:25 2000
Date: Thu, 29 Jun 2000 18:05:12 -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: <962327112-v9-i3516@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 29 Jun 2000 Volume: 9 Number: 3516
Today's topics:
Re: ***Do not use this code!*** Re: Perl Help Please! <pap@NOTHEREsotonians.org.uk>
Re: 2nd level of reference (Tad McClellan)
Re: array or hash when generating reports tgfree@my-deja.com
Re: catch error SQL <gellyfish@gellyfish.com>
Re: cgi.pm & parsing question <flavell@mail.cern.ch>
Re: cgi.pm & parsing question <gellyfish@gellyfish.com>
Re: concatenate two lists (Tad McClellan)
Re: concatenating two arrays <All@n.due.net>
deleting an entire line from a file <dekleine@sfu.ca>
Re: deleting an entire line from a file (Tad McClellan)
deleting entries in a hash <paulo@xilinx.com>
Formatting mtime wawork@hotmail.com
Re: Formatting mtime <tony_curtis32@yahoo.com>
Re: Getting data back from another application (Tad McClellan)
Re: Help with hashes <flavell@mail.cern.ch>
Re: Help with hashes (Tad McClellan)
Re: Help with hashes (Tad McClellan)
Re: I am looking for a local Mongers group in South Jer <gellyfish@gellyfish.com>
Re: I am looking for a local Mongers group in South Jer <gellyfish@gellyfish.com>
Re: I am looking for a local Mongers group in South Jer <gellyfish@gellyfish.com>
Re: I am looking for a local Mongers group in South Jer <gellyfish@gellyfish.com>
Re: I am looking for a local Mongers group in South Jer (Charles DeRykus)
Load a HTML-File on another server <matti@keller.com>
LWP Script <jrbrown@cts.com>
Message Board Problem (Kar Yan Mak)
Re: Need help with IIS configuration for Perl script su <gellyfish@gellyfish.com>
Re: NT vs Unix detection <paulo@xilinx.com>
Re: PERL & Informix <gellyfish@gellyfish.com>
Perl SAX2 (was Re: YAPC report) <ken@bitsko.slc.ut.us>
Re: regex - slurp file and extract email addresses (Abigail)
Re: String Cat Confussion <peter.sundstrom@eds.com>
Re: UK Perl Programmers Wanted for Small Jobs (David H. Adler)
Upgrading 5.005_03 to 5.6.0 <heinig@cs.ucdavis.edu>
Re: V4 vs V5 sourcing problem (Tad McClellan)
where did the email my perl script sent go? (yoshi)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 29 Jun 2000 23:32:44 +0000
From: "Paul Taylor" <pap@NOTHEREsotonians.org.uk>
Subject: Re: ***Do not use this code!*** Re: Perl Help Please!
Message-Id: <1dQ65.1714$Lg5.97362@nnrp3.clara.net>
Contrary to my earlier post, I do plan to continue this thread a little while
longer. After reflecting on the events of today with the benefit of being away
from a terminal, I asked myself what had actually happened.
I submitted some example code to aid a fellow Perl user. The code had a
significant security flaw, which was allowed to find its way onto alt.perl
and comp.lang.perl.misc through a combination of my own ( stupidity / naivete
/ assumptive nature ) - delete or indeed add, where appropriate.
The experts in this group had an opportunity to help two people out in a
constructive manner - one of them being the good fellow Magic, who had
specifically asked for it - the other being my good self, who had made a
serious faux pas in not including extra security information.
Save for a warning on the security aspects, Magic did not receive the
scripting info he / she required from the group. The code I produced would
have been acceptable in a controlled environment - although this was not made
clear by any of the follow-ups.
For my contribution, I was labelled firstly, by implication, the most
dangerous Perl coder on the planet, secondly unethical and finally, unfit to
contribute to CGI matters in this newsgroup for the foreseeable future.
Two problems arisen, neither answered in a constructive manner.
Perl is supposed to be a community. In a community, people contribute when
they can, right or wrong. There are always going to be leaders in a community,
and certain individuals are going to know a great deal more about the
mechanisms of that community.
However, when that is the case, such individuals should educate, not berate
those in need of help. In this thread, you had every right to point out the
security shortcomings in my script. You could have suggested an alternative,
or added to the script provided in order to make it safe.
To call someone unethical when you do not know the first thing about them,
is extremely presumptive. Secondly, suggesting that someone ceases
contributing to the community because they lack the complete canon of skills
to advise on a topic is tantamount to social exclusion.
Like I said before, you had an opportunity to help two people in the course
of this thread today, an opportunity to increase their knowledge in a positive
manner which would have empowered them to become more active in our community.
That opportunity was wasted, and all you have achieved through that thread is
the continuation of the growing trend which keeps people from posting in the
first place - the experts keeping everyone else at bay.
Thank you for your help,
Pap.
------------------------------
Date: Thu, 29 Jun 2000 17:28:12 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: 2nd level of reference
Message-Id: <slrn8lnfrc.4iq.tadmc@magna.metronet.com>
On Thu, 29 Jun 2000 16:45:40 -0400, Drew Simonis <care227@attglobal.net> wrote:
>* Tong * wrote:
>>
>> > Perl FAQ, part 4:
>> >
>> > "How can I expand variables in text strings?"
>>
>> Which is:
>>
>> $text = 'this has a $foo in it and a $bar';
>> $text =~ s/\$(\w+)/${$1}/g;
>>
>> To apply the technic in "How can I expand variables in text
>> strings?", I think I need to define a nother temp variable, which
>> seems a burden instead of a gain to me.
It is a consequence of the code you have shown to us.
Your code used single quotes, which do not interpolate, so
you have to replace the "variables" (there aren't really
any variables there, just substrings that look like variable
names) yourself.
If you want interpolation, then use double quotes instead.
>-------------------------------8<-----------------------------------
>
>#!/usr/bin/perl -w
>use strict;
>
>my $url_title = 'title here';
>my $url_addr = 'addr here';
>my $url_intro = 'intro stuffIngs';
>
>
>my $myformat="[]$url_title\n $url_addr\n\n $url_intro\n\n" ;
>
>$myformat =~ s/\$(\w+)/${$1}/g;
>
>print $myformat;
>
>----------------8<---------------------------------8<--------------------
>
>The above works for me.
Err, yes but ...
>Changed your single quotes to double quotes.
That is what fixed it.
>Didn't change anything else.
The FAQ answer code only works with _dynamic_ variables.
There are no dynamic variables in the code above, all
variables there are lexical variables.
The program above makes the same output without the s/// !
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 29 Jun 2000 22:45:07 GMT
From: tgfree@my-deja.com
Subject: Re: array or hash when generating reports
Message-Id: <8jgjhf$2lh$1@nnrp1.deja.com>
In article <395B7B88.4CBA1E55@gtri.gatech.edu>,
Stephen Kloder <stephen.kloder@gtri.gatech.edu> wrote:
> tgfree@my-deja.com wrote:
>
> >
> > My report is printing duplicates of ids and it is not generating the
> > total for each user. Here is what it prints:
> >
>
> >
> > Should I use a hash, arrays, or something else?
> >
>
> Whenever you are worried about duplicates, that's a good sign you
need a
> hash. Since you are worried most about duplicate id's you should use
the
> id as the hash key.
>
>
I found out how to print using a hash, however I don't know how to
print the sum of the orders.
This is what it is printing:
lakeside (2)
nstar (3)
amsr (1)
This is what I still need:
lakeside (2) - $40
nstar (3) - $60
amsr (1) - $20
Any suggestions?
Thanks for all the responses.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 30 Jun 2000 00:48:15 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: catch error SQL
Message-Id: <8jgn7v$eut$1@orpheus.gellyfish.com>
On Thu, 29 Jun 2000 10:37:53 GMT eastking@my-deja.com wrote:
> Hi,every one here.
>
> I'm using DBI and DBD::Oracle to access database. when I use following
> source
>
> $sth = $dbh->prepare("select foo, bar from table where
> baz=?");
>
> $sth->execute( $baz );
>
> while ( @row = $sth->fetchrow_array ) {
> print "@row\n";
> }
>
> If execution failed, How can I know the whole SQL with "?" replaced
> with $baz?
>
> I don't think following is the best idea
>
> my $sql = "select foo, bar from table where baz=?";
>
> $sth = $dbh->prepare($sql);
>
> $sth->execute( $baz );
>
> while ( @row = $sth->fetchrow_array ) {
> print "@row\n";
> }
>
> $sql =~ s/\?/$baz/ ;
>
You want to use { RaiseError => 1 } in your connect to find out what
went wrong ....
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Fri, 30 Jun 2000 00:00:37 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: cgi.pm & parsing question
Message-Id: <Pine.GHP.4.21.0006292351110.22526-100000@hpplus03.cern.ch>
On 29 Jun 2000, Malcolm Dew-Jones wrote:
> If you aren't extremely clear about what's unsafe and why then tainting
^,
> will not solve your problem
Very true (please excuse me for inserting a comma where I felt it
clarified the sense)
> The general strategy for tainting in this situation is to parse all input
> to make is safe before you use it.
I think that's why there's a WWW security FAQ, and why budding CGI
writers are urged to absorb it in detail before proceeding.
> Tainting checks that you haven't
> forgotten to parse the input, but this doesn't mean that you've parsed it
> correctly, and therefore doesn't mean the data is safe.
Absolutely.
[specific advice omitted]
But of course this advice has to be applied in ways that are
appropriate to the circumstances. If you insist on a valid ZIPcode,
you have automatically excluded any profits from outside of the USA,
and so on. Maybe you want that: it's your choice. At any rate the
principle is a good one, to only accept what you accept, and reject
all else, rather than rejecting what you suspect to be harmful and
accepting all else.
cheers
------------------------------
Date: 30 Jun 2000 01:57:01 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: cgi.pm & parsing question
Message-Id: <8jgr8t$s7i$1@orpheus.gellyfish.com>
On Thu, 29 Jun 2000 23:35:12 +0800 Kimochi3D wrote:
> Greetings,
> I'm designing my own version of formmail, but I intend to use the cgi.pm -
> I'm wondering if after getting the necessary variables from the form into
> the perl script, do I need to go though (parse or check) the variables again
> to ensure they do not contain any bad unix commands?
>
If you are going to do anything with user input (whether in the CGI or
anywhere less) that might expose you to this risk then you should censore
that input.
> I'm asking this because I am not familiar with "bad unix commands" :-)
>
Thats not at question. Just allow the input that you want and lose the
rest.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Thu, 29 Jun 2000 18:42:37 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: concatenate two lists
Message-Id: <slrn8lnk6t.4iq.tadmc@magna.metronet.com>
On Thu, 29 Jun 2000 12:32:14 -0700, Gurujiwan
<gorbeast@SPAMSUCKS.subduction.org> wrote:
>I am trying to join the contents of '@emails' with only 1 element of
><DATA>. The script I have worked out below does it with ALL of them. I
>cant figure it out. If you could help that would be very nice. Thanks,
---------------------------
#!/usr/bin/perl -w
use strict;
my @emails = ('foo@bar.com', 'bar@foo.com', 'no@email.address') ;
while (<DATA>) {
print "$emails[ $. - 1 ]\n"; # read about the $. variable:
# perldoc perlvar
print;
}
__DATA__
line1
line2
line3
---------------------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 29 Jun 2000 22:16:11 GMT
From: "Allan M. Due" <All@n.due.net>
Subject: Re: concatenating two arrays
Message-Id: <LUP65.266$cu1.1715@news1.rdc1.ct.home.com>
"Gorbeast" <gorbeast@SPAMSUX.subduction.org> wrote in message
news:gAO65.16192$NP5.384657@newsread2.prod.itd.earthlink.net...
: {{{{Sorry if I posted twice}}}}
:
: I am trying to combine two lists. I am trying to use the simplest way that
: I know of, although I am sure there is a better way. If you can help, that
: would be great. Thanks
:
:
: What I want is :
:
: email_1
: line1
:
: email_2
: line2
:
: email_3
: line3
:
:
:
: here is the code:
:
: ---------------------------------------------------------------------------
:
: #!/usr/bin/perl
: while (<DATA>) {
: @emails = ("foo\@bar.com", "bar\@foo.com", "no\@email.address") ;
: $emails_ref = \@emails;
: foreach $email (@$emails_ref) {
: print "$email\n";
: print; # (<DATA>);
: }
: }
:
Why the ref, and why the @emails defined in the loop. Weird. Anyway as long
as @emails and DATA are the same size.
@emails = ("foo\@bar.com", "bar\@foo.com", "no\@email.address") ;
print ((shift @emails)."\n",$_) while (<DATA>);
__DATA__
line1
line2
line3
HTH
AmD
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--Random Quote--
Although the Perl Slogan is There's More Than One Way to Do It, I hesitate to
make 10 ways to do something. :-)
Larry Wall in <9695@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 29 Jun 2000 22:25:07 GMT
From: Jennifer De Kleine <dekleine@sfu.ca>
Subject: deleting an entire line from a file
Message-Id: <8jgic3$bhs$1@morgoth.sfu.ca>
I need to delete all lines in some files that start with "foo". I
can't find a quick, easy way to get at the newline character, though.
I'm trying stuff like
$ perl -pi -e 's/^foo.*//' *
or
$ perl -pi -e 's/^foo.*//s' *
These delete all text from the appropriate line, but they leave the
final newline, which is annoying.
How can I do this quick and dirty from the command line?
Thanks,
jennifer de kleine
------------------------------
Date: Thu, 29 Jun 2000 19:16:29 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: deleting an entire line from a file
Message-Id: <slrn8lnm6d.4nn.tadmc@magna.metronet.com>
On 29 Jun 2000 22:25:07 GMT, Jennifer De Kleine <dekleine@sfu.ca> wrote:
>I need to delete all lines in some files that start with "foo". I
>can't find a quick, easy way to get at the newline character, though.
perl -pi -e 's/^foo.*//s' *
or
perl -pi -e 's/^foo.*\n//' *
>I'm trying stuff like
>
>$ perl -pi -e 's/^foo.*//' *
>or
>$ perl -pi -e 's/^foo.*//s' *
>
>These delete all text from the appropriate line, but they leave the
>final newline, which is annoying.
>
>How can I do this quick and dirty from the command line?
perl -ni -e 'print unless /^foo/' *
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 29 Jun 2000 14:48:23 -0700
From: Paulo Dutra <paulo@xilinx.com>
Subject: deleting entries in a hash
Message-Id: <395BC427.4ADF6CCC@xilinx.com>
I have hash in which I want delete entries as I iterate through.
I create copy of the original, so as not destroy the original data.
As I iterate through the entries, and make selective deletions
from %avbl_temp, this also deletes entries from the reference $avbl.
This sits in a for loop, so on each iteration I want to copy the
original data back to the working hash keys. This is simplified
from what I'm really doing. So how do I maintain the original
data set from being deleted while working on the copy of it?
for (n = 0; .....)
{
# Copy listing to a temporary working copy
my(%avbl_temp) = %$avbl;
delete $avbl_temp{'key'};
}
--
Paulo //\\\\
| ~ ~ |
( O O )
__________________________________oOOo______( )_____oOOo_______
| . |
| / 7\'7 Paulo Dutra (paulo@xilinx.com) |
| \ \ ` Xilinx hotline@xilinx.com |
| / / 2100 Logic Drive (800) 255-7778 |
| \_\/.\ San Jose, California 95124-3450 USA |
| Oooo |
|________________________________________oooO______( )_________|
( ) ) /
\ ( (_/
\_)
------------------------------
Date: Thu, 29 Jun 2000 23:25:25 GMT
From: wawork@hotmail.com
Subject: Formatting mtime
Message-Id: <8jglsl$4ad$1@nnrp1.deja.com>
I'm a perl newbie so this might be a stupid question. I wish to output
the month day year representing the mtime of a file. Using
(lstat("phone.txt")) [9]; I get a really weird number such as 992320088
What am I doing wrong?
Thanks,
Randy
wawork@hotmail.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 29 Jun 2000 19:14:33 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Formatting mtime
Message-Id: <87n1k49g9i.fsf@limey.hpcc.uh.edu>
>> On Thu, 29 Jun 2000 23:25:25 GMT,
>> wawork@hotmail.com said:
> I'm a perl newbie so this might be a stupid question. I
> wish to output the month day year representing the mtime
> of a file. Using (lstat("phone.txt")) [9]; I get a
> really weird number such as 992320088
Nothing weird about it. It's the number of seconds since
1970 (epoch time).
use POSIX qw(strftime);
my $mtime = strftime('%m-%d-%Y', $mtime_from_stat);
File::stat provides a nicer interface to the stat() and
lstat() functions.
hth
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Thu, 29 Jun 2000 17:55:43 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Getting data back from another application
Message-Id: <slrn8lnhev.4iq.tadmc@magna.metronet.com>
On Thu, 29 Jun 2000 13:56:40 -0500, Jordan Bohm <bohmj@mrs.umn.edu> wrote:
>I have a perl program that grabs ip addresses from people that visit my
>site. While this lets me know if the same people are hitting my site I
^^^^^^^^^^^
You don't really believe that, do you?
IPs identify _computers_ (kinda sorta).
Computers may have more than one user (people).
A single computer (e.g. firewall) may have thousands of
different people all using the same IP.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 30 Jun 2000 00:11:29 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Help with hashes
Message-Id: <Pine.GHP.4.21.0006300008090.22526-100000@hpplus03.cern.ch>
On Thu, 29 Jun 2000, Colby Hansen wrote:
> Probably... I just took offense to what he wrote to me...
You mean this?
___
/
>If you cannot be troubled to post your real code, then you
>shouldn't expect many others to be troubled with reading
>the code (that likely does not really exist anywhere).
>
>Use copy/paste, or import, or something.
>
>Trying to retype code is bound to earn you smart-ass comments
>about your typos, rather than help with your real problem...
\___
Then I'm adjusting your score appropriately. I see nothing that Tad
needs to learn from you, and something that you need to learn from,
well, the group. So cope with it, we've all been through this process
at some stage.
Oh look, an upside-down quoter. Ho hum
--
"Mir ist es ein Rätsel wie man mit minimalem Verstand so einen
Unfug fabrizieren kann." - Adrian Knoth
------------------------------
Date: Thu, 29 Jun 2000 17:39:52 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with hashes
Message-Id: <slrn8lngh8.4iq.tadmc@magna.metronet.com>
On Thu, 29 Jun 2000 13:01:25 -0600, Colby Hansen <cghansen@micron.com> wrote:
>By the way, how old are you???
I am "too old" for some things and "not old enough" for other things.
Why do you ask?
This is comp.lang.perl.misc, not soc.singles
(and I'm "taken" anyway, thanks for your interest)
:-)
How old are _you_?
How much money do you make?
What are you wearing right now? :-)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 29 Jun 2000 18:58:19 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with hashes
Message-Id: <slrn8lnl4b.4iq.tadmc@magna.metronet.com>
On Thu, 29 Jun 2000 16:12:06 -0400, Drew Simonis <care227@attglobal.net> wrote:
>Colby Hansen wrote:
>>
>> By the way, how old are you???
>>
>Heheh. I recall from previous posts that Mr. McClellan is a fully
>grown adult, and may even be a geezer!
^^^^^^
Watch it with the sass there, whippersnapper!
>But believe you me, his advise
>is worth listening too.
But only when I happen to be right, of course.
>He knows what hes doing with Perl...
But I'm only an "Adept", I guess.
Plenty of other folks here who are closer to nirvana.
I'll still be calling her "Mrs. Wall" years from now...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 30 Jun 2000 00:50:13 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I am looking for a local Mongers group in South Jersey.
Message-Id: <8jgnbl$fd8$1@orpheus.gellyfish.com>
On Thu, 29 Jun 2000 15:55:58 GMT Uri Guttman wrote:
>>>>>> "g" == garymgordon <garymgordon@yahoo.com> writes:
>
> g> I was also looking for your opinion on joining a Mongers group. (If
> g> you're a member ... what do you get out of it?? Is it worth geting
> g> involved??? Just your general thoughts?)
>
> i joined to meet babes.
>
Thats weird .... I joined to meet anchovies.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 30 Jun 2000 01:16:22 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I am looking for a local Mongers group in South Jersey.
Message-Id: <8jgosm$kep$1@orpheus.gellyfish.com>
On Thu, 29 Jun 2000 15:34:20 GMT garymgordon@yahoo.com wrote:
> In article <395B530F.E14769C1@attglobal.net>,
> Drew Simonis <care227@attglobal.net> wrote:
>> garymgordon@yahoo.com wrote:
>> >
>> > I am looking to join a local Mongers group in South Jersey.
>> >
>>
>> Did you check:
>> http://www.pm.org/groups/north_america.shtml
>>
> I was also looking for your opinion on joining a Mongers group. (If
> you're a member ... what do you get out of it?? Is it worth geting
> involved??? Just your general thoughts?)
>
So what are you saying, you are basically an asocial kind of character
who needs to get something out of social interaction for it to be worth
doing anything ? If you have to ask these questions then I dont think
that joining with a like minded group of individuals is for you - I would
recommend that you just sit in front of your computer and do whatever it is
you do .
But hey I dont think thats what you mean.
I dont know about South Jersey - I guess you dont mean the channel island -
but if you come to a London.pm meeting you get to have some drinks with
some excellent people who know more than you do and tell people things they
didnt know before, you chat you make friends and contacts and everything
is relevant to your experience hopefully ... If you are worried about
meeting people you might not like then join the mailing list - most groups
have one and these can be find via the site alluded to before - and check
the suckers out. Hey you can join the London.pm mailing list we have
almost as many 'foreigners' as we have people from the UK - (eh Dave ;)
and its all fun and its occasionally about Perl as well - we even have
several resident kooks bidding for world fame. Oh and there is yapc::Europe
too ...
Contact me if you need more information about London.pm (and I dont do ICQ)
Back to your usual programming.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 30 Jun 2000 01:17:28 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I am looking for a local Mongers group in South Jersey.
Message-Id: <8jgouo$klb$1@orpheus.gellyfish.com>
On Thu, 29 Jun 2000 11:44:28 -0400 Drew Simonis wrote:
> garymgordon@yahoo.com wrote:
>>
>> Drew Simonis <care227@attglobal.net> wrote:
>> >
>> > Did you check:
>> > http://www.pm.org/groups/north_america.shtml
>> >
>>
>> I was also looking for your opinion on joining a Mongers group. (If
>> you're a member ... what do you get out of it?? Is it worth geting
>> involved??? Just your general thoughts?)
>>
>> Thanks,
>> Gary
>
>
> The very first thing they teach you is not to post jeopardy style.
>
> I am not a member of any group, but I am sure it is as much like any
> social group as the rest of them. You get out of it what you put into
> it.
Another one who wants to be on the London.pm mailing list ...
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: 30 Jun 2000 01:21:50 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I am looking for a local Mongers group in South Jersey.
Message-Id: <8jgp6u$lge$1@orpheus.gellyfish.com>
On 29 Jun 2000 12:52:59 EDT Abigail wrote:
> Uri Guttman (uri@sysarch.com) wrote on MMCDXCIV September MCMXCIII in
> <URL:news:x7aeg4trap.fsf@home.sysarch.com>:
> // >>>>> "g" == garymgordon <garymgordon@yahoo.com> writes:
> //
> // g> I was also looking for your opinion on joining a Mongers group. (If
> // g> you're a member ... what do you get out of it?? Is it worth geting
> // g> involved??? Just your general thoughts?)
> //
> // i joined to meet babes.
>
>
> Which let to the Boston.pm split off "Mars needs more women".pm.
>
A kind of Boston 'anything but some kind of coffee' party ;-}
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Fri, 30 Jun 2000 00:21:18 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: I am looking for a local Mongers group in South Jersey.
Message-Id: <FwxyBI.1yH@news.boeing.com>
In article <8jgp6u$lge$1@orpheus.gellyfish.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>On 29 Jun 2000 12:52:59 EDT Abigail wrote:
>>
>> Which let to the Boston.pm split off "Mars needs more women".pm.
>>
>
>A kind of Boston 'anything but some kind of coffee' party ;-}
>
And in Boston, they definitely won't be doing tea... :)
--
Charles DeRykus
------------------------------
Date: Fri, 30 Jun 2000 03:05:51 +0200
From: Matthias Keller <matti@keller.com>
Subject: Load a HTML-File on another server
Message-Id: <395BF26F.131DDB98@keller.com>
Hi
Is it possible to redirect a browser to another HTML-File on another
server?
Thanks
Matt
------------------------------
Date: Thu, 29 Jun 2000 16:10:09 -0700
From: Jason Brown <jrbrown@cts.com>
Subject: LWP Script
Message-Id: <Pine.BSF.4.21.0006291559040.32132-100000@king.cts.com>
I am writing a little LWP script to find some
information on a web page. The first thing I must
to is log onto their site - which appears to be
ok.
However the response I get from my perl script is
not the same as I get when I do it manually.
Do I need to some how combine GET & POST -- or
other suggestions are welcome.
Here is a code segment:
my $cjar = LWP::UserAgent->new;
$cjar->cookie_jar(HTTP::Cookies->new(file => "ingramcookies.txt",autosave
=> 1, ignore_discard => 1));
# Submit User Info
my $auth = LWP::UserAgent->new;
my $req = POST "$ingram", [ USERNAME => "$uname", PASSWORD => "$passwd" ]
my $resp = $auth->request($req)->as_string;
Here is what is returned by the remote site:
HTTP/1.1 302 (Found) Moved Temporarily
Date: Thu, 29 Jun 2000 23:06:23 GMT
Location: [removed]
Server: [removed]
Content-Type: text/html
Client-Date: Thu, 29 Jun 2000 22:57:18 GMT
Client-Peer: 206.135.186.200:80
Set-Cookie: ssuid=Maynog00blk0004nelLmrJmda6; path= /; expires=Saturday,
06-Sep-2014 23:50:08 GMT
Set-Cookie: FORMCRED=GKEWYIjn0BWaGIV0+2eotXQIQZFFuNFzh7jw/mKrTLlWSKvrV9Lyui42jH7
Y8UcLK1d32H2/ZEtnf63nbgi082SnoiKmyaQE/JfNdlfpOY8=;path=/;
Set-Cookie: SMTRYNO=C=1 T=http%3A//www.ingrammicro.com/reseller/;path=/;
Note that the cookies are not being stored in the cookie jar since I need
a GET to do that ( or at least it seems that way ).
Thanks for any help you can provide....
Jason
------------------------------
Date: 29 Jun 2000 22:22:33 GMT
From: canon50e@aol.comDELETE (Kar Yan Mak)
Subject: Message Board Problem
Message-Id: <20000629182233.02054.00000877@ng-ch1.aol.com>
Hi, there's a problem with my message board and I'm not sure where to start
correcting it. I got the script from Matt's Script Archive.
My board is at: http://www.kyphoto.com/classics/forum/
The problem is that when someone replies to a message, the bullets are supposed
to span outwards under the original subject title, correct? But as you can see
with the most recent thread, the "canonet giii" all 5 replies and sub-replies
are the same length. Although some replies are perfectly OK, only some are
screwy.
Anyone know where I can start checking?
Thanks in advance,
Kar Yan Mak
------------------------------
Date: 30 Jun 2000 01:42:18 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Need help with IIS configuration for Perl script support
Message-Id: <8jgqda$pdc$1@orpheus.gellyfish.com>
On Thu, 29 Jun 2000 13:42:19 GMT Eirik Kjølsrud" wrote:
>
> - downloaded and installed a perl-interpreter (perl ver 5.001, perl for
> Win32 build 107)
>
Well dont do that. Get then latest and the greatest from :
<http://www.activestate.com/>
which comes with a very good set of documentation . Install, read
and then ask in comp.infosystems.www.servers.ms-windows if you have any
further questions about configuring your server to work with some language
interpreter.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Thu, 29 Jun 2000 16:19:13 -0700
From: Paulo Dutra <paulo@xilinx.com>
Subject: Re: NT vs Unix detection
Message-Id: <395BD971.F2FFB8AF@xilinx.com>
I pulled this from CGI.pm. It's system independent.
# FIGURE OUT THE OS WE'RE RUNNING UNDER
# Some systems support the $^O variable. If not
# available then require() the Config library
unless ($OS) {
unless ($OS = $^O) {
require Config;
$OS = $Config::Config{'osname'};
}
}
if ($OS=~/Win/i) {
$OS = 'WINDOWS';
} elsif ($OS=~/vms/i) {
$OS = 'VMS';
} elsif ($OS=~/bsdos/i) {
$OS = 'UNIX';
} elsif ($OS=~/dos/i) {
$OS = 'DOS';
} elsif ($OS=~/^MacOS$/i) {
$OS = 'MACINTOSH';
} elsif ($OS=~/os2/i) {
$OS = 'OS2';
} else {
$OS = 'UNIX';
}
Helder wrote:
>
> Try this:
>
> $OS=`uname`;
>
> if ($OS =~ /SunOS/)
> {
> print "Sistema SunOS.";
> }
> else
> {
> print "Outro Sistema.";
> }
>
> I am not so good in Perl. You make your improvements.
> :)
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
--
Paulo //\\\\
| ~ ~ |
( O O )
__________________________________oOOo______( )_____oOOo_______
| . |
| / 7\'7 Paulo Dutra (paulo@xilinx.com) |
| \ \ ` Xilinx hotline@xilinx.com |
| / / 2100 Logic Drive (800) 255-7778 |
| \_\/.\ San Jose, California 95124-3450 USA |
| Oooo |
|________________________________________oooO______( )_________|
( ) ) /
\ ( (_/
\_)
------------------------------
Date: 30 Jun 2000 01:36:40 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: PERL & Informix
Message-Id: <8jgq2o$oat$1@orpheus.gellyfish.com>
On Thu, 29 Jun 2000 15:27:54 +0200 Bogdan Pitulac wrote:
> Hi everybody,
>
> I have a question:
>
> How can I use sql-Statemens in a PERL (V5.00) -Script to get some data
> out a Informix (V7.30) database? Or where can I read something about
> these things?
>
Yes. As you can do with Oracle, Sybase, Postgres, MySQL ... I write
programs using DBD::Informix every day. To build DBD::Informix you
will require the Informix client SDK which can be downloaded from
http://www.intraware.com/ - you can get the DBI stuff via CPAN at
<http://search.cpan.org>. You might also want to view the archives of
comp.databases.informix on Deja News ....
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Thu, 29 Jun 2000 23:38:28 GMT
From: Ken MacLeod <ken@bitsko.slc.ut.us>
Subject: Perl SAX2 (was Re: YAPC report)
Message-Id: <x5n1k4njlm.fsf@bitsko.slc.ut.us>
Kip Kohn <kip@oreilly.com> writes:
> [re Standard XML APIs -- boon or bane]
> In short, I agree, and didn't want to appear as if I had taken some
> hard-lined, absolutist approach to the matter. In fact, I am glad
> that some of the ensuing posts raised important issues which I had
> initially overlooked. That notwithstanding, I still stand by the
> tennor of my original comments. In a significant proportion of the
> time, processing system and language integration are not a big
> issue. Beyond conformance with the XML spec (and possibly HTTP or
> some other TCP/IP layer), these are more or less stand alone
> applications. It was cases as this which I originally had in mind
> when I advocated "going for broke" and designing such powerful and
> purely Perlish interfaces that 'ports' to other languages are all
> but impossible. Perl is a prodigious virtuoso, if you will; let it
> not cease to make beautiful, euphonious music just because others
> are tone-deaf.
Well said.
If I may humbly say so, I think the merging of SAX and DOM concepts in
Perl SAX2* does exactly that -- gives it a Perlish interface that would
be the envy of many languages.
If I had a couple of wishes, the first would be that I could find a
tie() expert with some time to help finish the base module, and the
second that I could then convince all the rest of the XML module
writers that their modules should be based on SAX2.
-- Ken
(* The SAX2 doc is at
<http://bitsko.slc.ut.us/~ken/perl-xml/sax-2.0.html>. Not yet added
to that doc are pull-mode usage and support for incremental parsing.)
P.S. If that tie() expert happens to be familar with pair programming
(a la XP, <http://xprogramming.com>), I'd be glad to set aside as many
hours as it takes to do this.
P.P.S. I'd also be interested in article authors who could help drum
up interest in Perl SAX2.
------------------------------
Date: 29 Jun 2000 20:52:38 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: regex - slurp file and extract email addresses
Message-Id: <slrn8lnssg.ka1.abigail@alexandra.delanet.com>
Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCDXCIV September
MCMXCIII in <URL:news:8jgj4g$1br$1@orpheus.gellyfish.com>:
\\ On 29 Jun 2000 05:15:00 EDT Abigail wrote:
\\ > Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCDXCIV September
\\ > MCMXCIII in <URL:news:8jf3si$uft$1@orpheus.gellyfish.com>:
\\ > ))
\\ > )) But people arent saying that what you are proposing is a worse way of
\\ > )) searching for e-mail addresses , they are saying that it isnt a way of
\\ > )) searching for *e-mail addresses* at all. You might as well print every
\\ > )) line of the text with an '@' in it for all the hand cleaning you are
\\ > )) going to have to do with your data (and even that isnt foolproof as the
\\ > )) address might easily have a newline in it).
\\ >
\\ >
\\ > And let's not forget, not every address has a @ in it.
\\ >
\\
\\ Yes, but one doesnt like to mention 'bang path' in the company of some of
\\ these boys ...
I wasn't talking about bang paths.
RC822 doesn't deal with bang paths. RFC822, however, defines a grammar
that allows for email addresses without a @.
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: Fri, 30 Jun 2000 12:03:56 +1200
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: String Cat Confussion
Message-Id: <8jgo8c$5fd$1@hermes.nz.eds.com>
don_bryant@my-deja.com wrote in message <8jfrt0$f5v$1@nnrp1.deja.com>...
>Please consider the following:
>
>my $string1="/export/home/";
>my $string2="00-06-30";
>my $new_path="";
>
>$new_path= join $new_path, $string1, $string2, "/";
>
Just use
my $new_path="$string1$string2/";
------------------------------
Date: 29 Jun 2000 22:47:24 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: UK Perl Programmers Wanted for Small Jobs
Message-Id: <slrn8lnkfs.t82.dha@panix2.panix.com>
On Wed, 28 Jun 2000 09:43:39 +0100, Robert Dupont
<Dupont@netcomuk.co.uk> wrote:
>Please get in touch if you can do this and want to earn some money
However, if you want to irk people, make posts like the one this
message replies to.
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Looking at the cake is like looking at the future. Until you taste
it, what do you really know? And, of course, by then, it's much too
late. - Merlin, Excalibur
------------------------------
Date: 29 Jun 2000 23:53:39 GMT
From: Lael Matthew Heinig <heinig@cs.ucdavis.edu>
Subject: Upgrading 5.005_03 to 5.6.0
Message-Id: <8jgni3$ntv$1@mark.ucdavis.edu>
I am running on Linux 6.1 with 5.005_03 pre-installed. I've installed
the new version, 5.6.0. Things aren't working right. It appears that
the two versions are mixing. Should I have removed 5.005_03 first?
Here is the values from @INC:
% perl -e 'print join("\n",@INC)'
/usr/lib/perl5/5.6.0/i386-linux-thread
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux-thread
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl/5.005
/usr/lib/perl5/site_perl
I am trying to write a program that interacts with the MySQL database
and is multithreaded. When I run my program, I get the following:
% ./mybulk_mail.pl -test=real -tester=lael -file=/home/lael/MSG_files/today
Can't load '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI/DBI.so' for module DBI: /usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI/DBI.so: undefined symbol: PL_stack_max at /usr/lib/perl5/5.6.0/i386-linux-thread/DynaLoader.pm line 200.
at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 158
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 158.
Any ideas?
Thanks,
Lael Heinig
------------------------------
Date: Thu, 29 Jun 2000 17:49:12 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: V4 vs V5 sourcing problem
Message-Id: <slrn8lnh2o.4iq.tadmc@magna.metronet.com>
On Thu, 29 Jun 2000 21:25:26 +0100, jb <jbroz@yperite.demon.co.uk> wrote:
>Ron Auer wrote:
>>
>> I am working with a product called Tivoli and they package Perl 4.0.
>
>Tell IBM (who own Tivoli) to provide perl 5.
Tivoli claims to be switched to Perl 5 by this Fall.
I hope they don't always wait 5 years between upgrades...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 29 Jun 2000 22:49:56 GMT
From: catgolf888@aol.com (yoshi)
Subject: where did the email my perl script sent go?
Message-Id: <20000629184956.02029.00001332@ng-md1.aol.com>
Hello.
I am working on a very simple script to send an email to someone (to be built
upon later) through perl. It runs fine, and prints the blank screen, but the
email never arrives. How long should it take (I have included the script
below)?
Thanks!
yoshi
datera@datera.com
===============================
#!/usr/local/bin/perl -w
print "Content-Type: text/html\n\n";
use Net::SMTP;
my $subject = "Subject: My test message\n\n";
my $message = <<EOM;
Perl sent this message. Nifty, Eh?
EOM
$smtp = Net::SMTP->new('mailhost');
$smtp->mail($ENV{USER});
$smtp->to('datera@datera.com');
$smtp->data();
$smtp->datasend($subject);
$smtp->datasend($message);
$smtp->dataend();
$smtp->quit();
===============================
------------------------------
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 3516
**************************************