[13380] in Perl-Users-Digest
Perl-Users Digest, Issue: 790 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 14 08:08:26 1999
Date: Tue, 14 Sep 1999 05:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 14 Sep 1999 Volume: 9 Number: 790
Today's topics:
Array Problems <m.scheferhoff@gmx.de>
Re: Array Problems (Sam Holden)
Re: bin2hex and back again (Chris Nandor)
ceiling a decimal number <dvoon@my-deja.com>
Re: ceiling a decimal number (Michael Fuhr)
Re: CGI cannot open relative path <jdupayrat@webraska.com>
Re: Does Perl have a Y5.760K problem? <jkekoni@cc.hut.fi>
Greetings from a Newbie <tonypeardon@home.com>
how can i list a directory into a browser?? <abel.almazan@ogilvyinteractive.es>
Re: how can i list a directory into a browser?? <bauer@zrz.tu-berlin.de>
How to download page/image? <Anton.Klevtsov@profic.ee>
Re: Idea for extracting name from city? <wyzelli@yahoo.com>
Method=Post & frames <maen@packet-technologies.com>
Pattern matching is hard :-( <dane@infi.net>
Re: Pattern matching is hard :-( (Sam Holden)
Re: Perl Y2k (Chris Nandor)
playing sound files sophieloo@my-deja.com
Re: Reading files on a remote server ???????? <stewart@xcs.com.au>
Re: regexp with variables containing unknown data (Abigail)
Re: Regular Expresions <rhomberg@ife.ee.ethz.ch>
SDBM errors on Win32 <mattking@techie.com>
Re: Searching by date problem. (Abigail)
Showing a nice looking tree from datasource (ton)
split comp.lang.perl.misc ? <michel.combes@hl.siemens.de>
Re: split comp.lang.perl.misc ? (Matthew Bafford)
Re: split comp.lang.perl.misc ? <c4jgurney@my-deja.com>
Re: UNCRAP project proposal (Chris Nandor)
unicode converter? <kaufman@hongkong.com>
Re: Usefulness of CGI.pm (Was Re: UNCRAP project propos (Chris Nandor)
Re: where to write perl??? (Gabor)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 14 Sep 1999 11:40:15 +0200
From: Michael Scheferhoff <m.scheferhoff@gmx.de>
Subject: Array Problems
Message-Id: <37DE17FF.1E54EE24@gmx.de>
Hallo,
is it possible to put a value in the middle of an array, so that the
ones behinds move one place down?
Thanks,
Michael
------------------------------
Date: 14 Sep 1999 09:44:41 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Array Problems
Message-Id: <slrn7ts689.9nn.sholden@pgrad.cs.usyd.edu.au>
On Tue, 14 Sep 1999 11:40:15 +0200, Michael Scheferhoff
<m.scheferhoff@gmx.de> wrote:
>Hallo,
>
>is it possible to put a value in the middle of an array, so that the
>ones behinds move one place down?
perldoc -q splice
--
Sam
Every human culture has good and bad points. Every computer program has
Eveone more bug. Even Perl.
--Larry Wall
Sam
------------------------------
Date: Tue, 14 Sep 1999 11:37:19 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: bin2hex and back again
Message-Id: <pudge-1409990737230001@192.168.0.77>
In article <wAbD3.145966$5r2.217456@tor-nn1.netcom.ca>, "Kevin Howe"
<khowe@performance-net.com> wrote:
# NAME
# Convert::BinHex - extract data from ==MACINTOSH BINHEX FILES ==
#
# ==ALPHA WARNING==: this code is currently in its Alpha release. ==THINGS MAY
# CHANGE DRASTICALLY== until the interface is hammered out: if you have
# suggestions or objections, please speak up now!
#
# Not exactly the most stable of modules, and it is designed for Macintosh
# files specifically.
The most recent release is from June 27, 1997. That's pretty stable. And
it is designed for Mac files, but can work on any files. Just don't
supply resource fork data, and it works only on the data fork data (which
is what you want).
I am not saying the module route is the best ... but you originally posted
about a Bin2Hex module, and this existing one does a reasonable job.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 14 Sep 1999 10:34:28 GMT
From: dVoon <dvoon@my-deja.com>
Subject: ceiling a decimal number
Message-Id: <7rl8bj$a0a$1@nnrp1.deja.com>
Hi,
How to take the 'ceiling' of a decimal number in Perl?
Example: the ceiling of 5.1 is 6;
5.8 is 6;
5.23 is 6.
I'm using the latest ActivePerl and have looked around the documentation
but still unable to find any function/operation that does that. Please
help. Thanks.
Daniel
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 14 Sep 1999 04:51:35 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: ceiling a decimal number
Message-Id: <7rl9bn$482@flatland.dimensional.com>
dVoon <dvoon@my-deja.com> writes:
> How to take the 'ceiling' of a decimal number in Perl?
>
> Example: the ceiling of 5.1 is 6;
> 5.8 is 6;
> 5.23 is 6.
>
> I'm using the latest ActivePerl and have looked around the documentation
> but still unable to find any function/operation that does that. Please
> help. Thanks.
See the perlfaq4 manual page.
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
You could also use deja.com's "Power Search" to find the answer:
1. Take your browser to http://www.deja.com/
2. Click on "Power Search"
3. In the "Enter Keywords" field, type "ceiling"
4. In the "Forum" (i.e., newsgroup) field, type "comp.lang.perl.misc"
5. Hit "Search"
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
------------------------------
Date: Tue, 14 Sep 1999 11:19:34 +0100
From: "JduPayrat" <jdupayrat@webraska.com>
Subject: Re: CGI cannot open relative path
Message-Id: <7rl3pr$eko$1@minus.oleane.net>
>I can't answer re: what's different in 003 vs 005, but I find that calling
>files by an absolute path is almost always a good idea in CGI scripts. Or,
>could you "chdir" to the proper directory first? Then, presumably, all
>your "relative" paths would be relative to the correct directory.
I tried but it doesn't work. In fact, even if my cgi know its current
directory (I've tested that), it doesn't accept
any relative path to the open function.
------------------------------
Date: 14 Sep 1999 07:42:30 GMT
From: Joonas Timo Taavetti Kekoni <jkekoni@cc.hut.fi>
Subject: Re: Does Perl have a Y5.760K problem?
Message-Id: <7rku96$ccgp$2@midnight.cs.hut.fi>
Tom Phoenix <rootbeer@redcat.com> wrote:
: Test one: Prepared the test machine by installing clean copy of perl
: 5.005_03. Placed 5,760 yen upon the monitor. No observed response. Ran
: test suite again; all tests successful. Spent 5,760 yen on sushi during
: lunch with lab assistant. The wimp wouldn't eat the eel.
No Thanks, no sushi for me. I prefer my current position at the
top of the food chain.
-- Joonas Kekoni 20.5.1999
--
_- Joonas Kekoni OH2MTF I -_
_-internet: jkekoni@cc.hut.fi I DO NOT EAT. -_
_-slowmail: j{mer{ntaival 7a176 I -_
_- 02150Espoo I It is a monitor -_
_- Finland/Europe I -_
------------------------------
Date: Tue, 14 Sep 1999 07:11:19 GMT
From: Tony Peardon <tonypeardon@home.com>
Subject: Greetings from a Newbie
Message-Id: <37DDF4D2.FE3C1EB3@home.com>
Hello Everyone, I am a Newbie. I hate being a Newbie, but
when one undertakes to learn a new language, be it computer
based or otherwise, one has little choice. As you all know,
one of the main characteristics of a Newbie is that a Newbie
asks lots of questions, and I shall be no different, but
before I attack my own ignorance, I shall provide a quick
glance at my own personal history as this information may
help in answering the stupid questions that I am likely to
ask.
I am a programmer who is not but once was, or less
cryptically, I used to program in Turbo Pascal, back when it
was cool, before C/C++ took center stage and before anyone
ever heard of OOP. I was/am very good with Pascal, and
could likely make it do things that would surprise even the
wisest of the Gurus. I learned it very quickly, and intend
to do the same now with these newer languages. Pascal is a
dead language now, and now, after years of not touching a
computer, of not following the industry, of not learning, I
am again, as I have said, a newbie. My Internet connection
is less than a week old, and already, I have touched upon
C/C++, Visual Basic, Java, JavaScript and HTML. Now I add
Perl to my list.
1. In what circumstances would you, as a multi-lingual
programmer, use the Perl language? In what circumstances
would you not? What might you use instead?
2. As a strong advocate of Perl, what other languages do you
recommend, and why?
3. CGI = Common Gateway Interface = Huh?
4. What is the expected life span of a Newbie?
5. As a Professional Programmer, how much $US (I'm Canadian)
do you make in a year? Do you make it in bursts, or
gradually? What country do you work in?
6. What computer language has been the most useful to you?
Why? Who are you?
I look forward to getting to know all of you, if only just a
little, and I look forward to learning something from each
of you, and I look forward to teaching the next generation
of Newbies, when I am the Guru. Pleasant coding
everyone...
Tony Peardon,
Newbie...
Speaker of Questions...
Future Guru!!!
------------------------------
Date: Tue, 14 Sep 1999 10:43:57 +0200
From: Abel =?iso-8859-1?Q?Almaz=E1n?= <abel.almazan@ogilvyinteractive.es>
Subject: how can i list a directory into a browser??
Message-Id: <37DE0ACC.A5E84480@ogilvyinteractive.es>
I want to list a directory into a Netscape/Explorer browser, and each
file i list will have a hyperlink.
How can i do??
Please, answer me quickly
Thanks
------------------------------
Date: Tue, 14 Sep 1999 12:53:30 +0200
From: Christoph Bauer <bauer@zrz.tu-berlin.de>
Subject: Re: how can i list a directory into a browser??
Message-Id: <37DE292A.930FD4E8@zrz.tu-berlin.de>
Hi,
Abel Almazán wrote:
>
> I want to list a directory into a Netscape/Explorer browser, and each
> file i list will have a hyperlink.
>
> How can i do??
using Perl ?
unlink 'index.html';
>
> Please, answer me quickly
Quick enough ?
Christoph
------------------------------
Date: Tue, 14 Sep 1999 11:23:35 +0300
From: Anton Klevtsov <Anton.Klevtsov@profic.ee>
Subject: How to download page/image?
Message-Id: <37DE0607.35C106E3@profic.ee>
hi!
does anybody know how to download page and image from another WEB server
to my server?
--
Anton Klevtsov
Software Developer
Profic OY
------------------------------
Date: Tue, 14 Sep 1999 20:38:49 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Idea for extracting name from city?
Message-Id: <51qD3.6$hj6.1355@vic.nntp.telstra.net>
>
> But to attain the highest degree of accuracy you're going to need a
> Semantic engine...i.e. a person.
>
> -Dave
By the time all this mucking around has taken place the so called 'semantic
engine' has finished the job by quickly scrolling through the db and adding
the required field separator, died of boredom and been cremated after
repetitively muttering 'Grand Prarie NOT Prarie, Grand Prarie NOT Prarie,
Grand Prarie NOT Prarie' incessantly!
Wyzelli
;^)
------------------------------
Date: Tue, 14 Sep 1999 09:51:17 +0200
From: "Maen Suleiman" <maen@packet-technologies.com>
Subject: Method=Post & frames
Message-Id: <7rkui6$a3d$1@news.netvision.net.il>
Hi to all ,
I have this weird phenomena : i have html page with a form inside ,
this form call another cgi program that create a html page WITH FRAMES . the
frames sources are both cgi and html pages !
the weird thing is , that when the form action method=post , it works well
in the Netscape , but in Explorer it give me "Page not found " Error
messages in all of the frames and when i do refresh it it show the frames
well !
when the method is not post , it works well ! ,
any suggestions ?!
Thanks in Advance
--
================================================
Maen Suleiman
Software Engineer
Packet Technologies Ltd.
================================================
6 Hamachtesh st. Industry Area, Holon 58810 Israel
Tel +972-3-558-7001
Fax +972-3-558-7003
Mobile +972-54-706-710
Email maen@packet-technologies.com
Web http://www.packet-technologies.com
================================================
------------------------------
Date: Tue, 14 Sep 1999 04:20:44 -0400
From: "Mr. Dave" <dane@infi.net>
Subject: Pattern matching is hard :-(
Message-Id: <37DE055B.CDE2FB73@infi.net>
There must be someway to grep for a range of some numbers, the
numbers being given as variables???
$time1 = 12
$time2 = 23
grep ( /$time1 .. $time2/, @data );
Is what I'd like to do but does not work???
I want to pull all occurences of 12 - 23 out of the data array...
Am I stupid??
Thanx for any help
dave.
------------------------------
Date: 14 Sep 1999 08:26:17 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Pattern matching is hard :-(
Message-Id: <slrn7ts1l9.4k2.sholden@pgrad.cs.usyd.edu.au>
On Tue, 14 Sep 1999 04:20:44 -0400, Mr. Dave <dane@infi.net> wrote:
> There must be someway to grep for a range of some numbers, the
>numbers being given as variables???
>
>$time1 = 12
>$time2 = 23
>
>grep ( /$time1 .. $time2/, @data );
>Is what I'd like to do but does not work???
>
>I want to pull all occurences of 12 - 23 out of the data array...
>Am I stupid??
Don't use a regex use something like $_>=12 && $_<=23...
--
Sam
why can't newbies use hash slices in their hello world programs? :-)
-- Uri Guttman in <x74skxhve5.fsf@home.sysarch.com>
Sam
Every human culture has good and bad points. Every computer program has
Eveone more bug. Even Perl.
--Larry Wall
------------------------------
Date: Tue, 14 Sep 1999 11:40:20 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Perl Y2k
Message-Id: <pudge-1409990740250001@192.168.0.77>
In article <37DD72D5.66FAE5DA@hns.com>, Li Kong <lkong@hns.com> wrote:
# Why are you so upset? It is just one line message.
See below.
# It will waste you only 5 seconds to look at my question.
# You'd rather spend 2 or 3 minutes send a gabage reply.
You would rather waste 5 seconds of the thousands of people who read this
newsgroup instead of taking a few minutes yourself to look up the answer
in the readily available documentation.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 14 Sep 1999 07:45:35 GMT
From: sophieloo@my-deja.com
Subject: playing sound files
Message-Id: <7rkuet$3p6$1@nnrp1.deja.com>
I'm new to perl and linux and would like to open and play small midi
files from within a program, preferably without a time lag. When I
backquote `play` I get a sox man page which I cannot decipher.
One other question... if I ftp a .mid or .wav file from windows should
I change the extension to .au ?
thanks,
Elaine
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 14 Sep 1999 21:00:02 +1000
From: "Stewart Pitt" <stewart@xcs.com.au>
Subject: Re: Reading files on a remote server ????????
Message-Id: <937306569.498055@diddley.primus.com.au>
Apologies for being a bit vague in my initial message.
What I want to do is execute a perl script on my local server that opens and
file on a remote server for either read, write or append. Then perform
actions against the file while it still resides on the remote server.
Stewart Pitt
X-IT Computer Services P/L
Martien Verbruggen <mgjv@comdyn.com.au> wrote in message
news:zalD3.183$Wz1.12377@nsw.nnrp.telstra.net...
> In article <7renur$6el$1@news.eisa.net.au>,
> "Stewart Pitt" <stewart@xcs.com.au> writes:
> > Does any one know if using perl whether or not I can execute a script on
one
> > server and open a file to read or write on another server connected only
by
> > the internet?????
>
> Yes, you can. Most likely you will need to have some underlying
> protocol like NFS or SMB to do this, or you could pull the file down
> with ftp, edit it locally and put it back. Many possibilities.
>
> Can't e of any more help than that, because you don't tell us very
> much, now, do you?
>
> Martien
> --
> Martien Verbruggen |
> Interactive Media Division | If it isn't broken, it doesn't have
> Commercial Dynamics Pty. Ltd. | enough features yet.
> NSW, Australia |
------------------------------
Date: 14 Sep 1999 02:07:19 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: regexp with variables containing unknown data
Message-Id: <slrn7trt69.f00.abigail@alexandra.delanet.com>
Brad Barnett (bbarnett@nospamhere.L8R.net) wrote on MMCCIV September
MCMXCIII in <URL:news:37DD1F23.4978828B@nospamhere.L8R.net>:
""
"" Hmm, well, quotemeta seems to rule, except for some reason, it doesn't
"" ;) I don't know why this is happening, but let me give an example :
""
"" $a = "it.some.we[";
"" $b = "it.some.we[";
""
"" $c = quotemeta $a;
"" $d = quotemeta $b;
""
"" Now, at this point
""
"" $c == "it\.some.\we\[" and $d == "it\.some.\we\["
""
"" But :
""
"" if ($c =~ /$d/) {something();}
""
"" Doesn't happen.... er, why??!
Because now, $c has backwacks in them, and $d doesn't match backwacks.
You should only apply the quotemeta on the string used in the regex,
not the string to be matched.
Of course, if you want to match exact strings, don't use regexes
at all. Use the FAQ.
Abigail
--
perl -wlpe '}$_=$.;{' file # Count the number of lines.
-----------== 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: Mon, 13 Sep 1999 13:59:18 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
To: m.scheferhoff@gmx.de
Subject: Re: Regular Expresions
Message-Id: <37DCE716.30BA4EA7@ife.ee.ethz.ch>
> I have:
>
> <1.part> <2.part> <...> <...> <last part>
>
> I need:
>
> <last part>
>
> including the brackets or without brackets.
$_ = '<1.part> <2.part> <...> <...> <last part>';
m/(<([^>]*)>)[^<]*$/;
print "\$1=$1 \$2=$2\n"; #prints $1=<last part> $2=last part
- Alex
------------------------------
Date: Tue, 14 Sep 1999 13:53:14 +0200
From: "Matt King" <mattking@techie.com>
Subject: SDBM errors on Win32
Message-Id: <7rlbc5$u70$1@news.uk.ibm.com>
Hello, I recently posted here about this problem but I got no response. I'm
sure someone else has seen this. Further testing has shown that if the SDBM
file is 4,096+-bytes to 8,192+-bytes, the SDBM module can not read all the
data from the file(s). Using a hex editor and a text editor and Norton
Commander for DOS I viewed the contence of the file in question and the data
was there. There are times when writing to the file that is this size that
the files receives some other data. I used SpeedDisk to reorginize the data
on the HDD with a wipe free space, and this apears to have solved the
problem with the strange data, but the problem with the SDBM module having a
problem reading and writing the data correctly needs to be addressed. Who
can I point this to for investigation? I wish to continue using the SDBM DB
since it solves several problems that I was having using the famous text
file way (atleast for me), but if the module is going to have read and write
problems like this, it causes more problems then it solved.
Matt.
------------------------------
Date: 14 Sep 1999 02:39:37 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Searching by date problem.
Message-Id: <slrn7trv2q.f00.abigail@alexandra.delanet.com>
Benjamin Franz (snowhare@long-lake.nihongo.org) wrote on MMCCV September
MCMXCIII in <URL:news:3CgD3.317$6i5.21591@typhoon01.swbell.net>:
@@ In article <MPG.1247264746c2eca7989f56@nntp.hpl.hp.com>,
@@ Larry Rosler <lr@hpl.hp.com> wrote:
@@ >
@@ >Although this issue might not have occurred to Benjamin Franz, I think
@@ >that suggestions to reject two-digit year input for the huge majority of
@@ >programs are misguided and injure our profession. People have 'always'
@@ >used two-digit years, and 'always' will continue to do so.
@@
@@ Welcome to the 'century bug'. Guess what happens in 2100 - one century
@@ after everyone 'learns the lesson'. I would argue the opposite.
I think the biggest problem is that people don't listen.
You didn't listen to the previous posters.
@@ These are all side points. The _right thing_ remains four digit years.
What? Doesn't the Y2K issues learn you a single thing? Do you really want
to repeat history? 4 digit years will create a Y10K bug. That might seem a
long time away, but people dealing with the storage of higly radioactive
waste might use dates like Jan 1, 12000. And you wouldn't want to have
some barrels of nuclear waste delivered at your house 10000 years early,
now would you?
4 _byte_ years, that's more sensible. And even then you have to watch out.
@@ Two digit years and long term data processing are inherently incompatible.
@@ If you want to argue against long term information processing - fine.
Long term data processing? As in a process that just doesn't want
to terminate? The point is that you are talking about long term data
*storage* but you do that as a flame to someone who's talking about
data processing in context.
If I order something on the web, and type in the expiration date of my
credit card as Sep 01, most web sites don't think I mean 1 BC, or 1901
BC. They will assume 2001 BC. Which is perfectly fine. The databases that
store my credit card information will store the expiration date as 2001.
@@ But once you accept that you are going to be storing and using information
@@ for or covering long periods of time it becomes apparent that 2 digits
@@ is not _and cannot be made_ adequate. Sliding windows and other sleight
@@ of hand can't ultimately protect you against the _necessity_ to enter
@@ four digit dates in the first place. And greatly increase the final
@@ costs of maintaining systems.
I assume your keyboard has just 2 keys, a 0 and a 1, because that's how
data should be stored and processed?
Abigail
--
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
-----------== 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: 14 Sep 1999 08:40:19 GMT
From: no@email.com (ton)
Subject: Showing a nice looking tree from datasource
Message-Id: <7rl1lj$ulu$1@enterprise.cistron.net>
Hi all,
I've written a nice recursive routine to show a treeview from a table.
I have a table with the following fields:
- Id
- Name
- ParentId
Now this routine creates a hash that makes a treeview of the table in HTML like this:
+-Cars
| +-BMW
| +-Mercedes
| | +-300
| | +-400
| | | +-A
| | | +-B
| | | +-C
| | +-500
| | +-600
| +-Volvo
| +-v90
| +-850
+-Computers
+-Apple
+-PC
+-Amiga
It looks very nice, but what I really want is this look:
+-Cars
| +-BMW
| +-Mercedes
| | +-300 500 600
| | +-400
| | +-A B C
| +-Volvo
| +-v90 850
+-Computers
+-Apple PC Amiga
It really puzzles me, can anyone give me some help achieving this?
Regards,
Ton
<headers>
sub GetSubtree
{
my $ParentId=shift;
my $bars=shift;
my $looparray=shift;
my $subcathash=shift;
my $statement="SELECT Id,Naam,ParentId FROM Categorie WHERE ParentId=$ParentId"; # get the values from the database
my $sth = $dbh->prepare($statement);
my $rv = $sth->execute;
if($sth->rows == 0) {return;} # nothing here, return 0
my $count=0;
while(my @row = $sth->fetchrow_array) # get each row one by one
{
my($Id,$Naam,$ParentId)=@row; # put he returned list in some variables
my $image;
my $bar;
my $straight;
$count++;
if($sth->rows==$count) # is this the last one?
{
$image='<IMG SRC="images/bend.jpg">';
$bar='<IMG SRC="images/empty.jpg">';
}else # make a t-point
{
$image='<IMG SRC="images/tpoint.jpg">';
$bar='<IMG SRC="images/straight.jpg">';
}
push(@$looparray,{'bars'=>$bars,'ParentId'=>$Id,'image'=>$image,'Naam'=>$Naam}); # fill the looparray with the names & images
GetSubtree($Id,$bars.$bar,$looparray,$subcathash); # go look for another subtree
}
}
------------------------------
Date: Tue, 14 Sep 1999 10:44:12 +0200
From: Michel Combes <michel.combes@hl.siemens.de>
Subject: split comp.lang.perl.misc ?
Message-Id: <37DE0ADC.A8C09BE0@hl.siemens.de>
All,
Can we split comp.lang.perl.misc
to have a clear separation of the Perl articles related to Web/CGI stuff
and the Perl articles for others utilities /scripts ...
because misc is just too big!
may I suggest :
+ comp.lang.perl.cgi or comp.lang.perl.web
+ comp.lang.perl.util
can we have a Call for Vote
Regards,
-Michel
--
Dr. COMBES, HL MD CPD, MchM, Michel.Combes@HL.Siemens.de
Phone: +49 89/234-83883, Fax: +49 89/234-83319
" Do not follow where the path may lead. Go instead
where there is no path and leave a trail. "
------------------------------
Date: Tue, 14 Sep 1999 10:42:11 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: split comp.lang.perl.misc ?
Message-Id: <slrn7ts8r7.2p2.*@dragons.duesouth.net>
On Tue, 14 Sep 1999 10:44:12 +0200, Michel Combes
<michel.combes@hl.siemens.de> poured coffee onto a keyboard, producing
the following in comp.lang.perl.misc:
: All,
You,
: Can we split comp.lang.perl.misc
...
: can we have a Call for Vote
We already have, in this very newsgroup. PLEASE search the newsgroup
before asking a question.
http://www.deja.com/=dnc/
: Regards,
HTH,
: -Michel
--Matthew
------------------------------
Date: Tue, 14 Sep 1999 11:50:25 GMT
From: Jeremy Gurney <c4jgurney@my-deja.com>
Subject: Re: split comp.lang.perl.misc ?
Message-Id: <7rlcpu$cv5$1@nnrp1.deja.com>
In article <37DE0ADC.A8C09BE0@hl.siemens.de>,
Michel Combes <michel.combes@hl.siemens.de> wrote:
> All,
>
> Can we split comp.lang.perl.misc
> to have a clear separation of the Perl articles related to Web/CGI
stuff
What a good idea, we could call it comp.infosystems.www.authoring.cgi
Jeremy Gurney
SAS Programmer | Proteus Molecular Design Ltd.
"Sometimes I think the so-called experts actually are experts."
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 14 Sep 1999 11:52:59 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: UNCRAP project proposal
Message-Id: <pudge-1409990753040001@192.168.0.77>
In article <x7btb6kymh.fsf@home.sysarch.com>, Uri Guttman
<uri@sysarch.com> wrote:
# i don't care as much about html as you do. it is not a major part of my
# career. i know enough to mess around with it and do things. i don't need
# to know style sheets, etc.
You do if you want to create proper HTML 4.0 and do things like alignments
for all types of elements, font sizes, etc. Many things (see below) that
you want to do to make elements look nice on the page are illegal.
# i mean that center( blah blah blah ... ) will either be correct perl or
# not and it will generate what i expect center to do.
<CENTER></CENTER> is now illegal HTML (in 4.0).
Of course, CGI.pm creates illegal HTML anyway by itself, since it does not
give you a DOCTYPE, so who knows WHAT version of HTML you are using?
# handling of html syntax. no halting problem solved here. if i had, i
# would have published it in the too small margins of OO Perl. :-)
Yes, we all know you reviewed the book and were named in it.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 14 Sep 1999 15:48:44 +0800
From: "Kaufman Chang" <kaufman@hongkong.com>
Subject: unicode converter?
Message-Id: <7rkug4$kpd@news.tw.aunet.net>
Are there any Perl script for unicode conversion?
for example:
$ uniconv.pl 0041
output: A
$ uniconv.pl 0042
output: B
Thanks for your help~~
Kaufman
------------------------------
Date: Tue, 14 Sep 1999 11:45:03 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Usefulness of CGI.pm (Was Re: UNCRAP project proposal)
Message-Id: <pudge-1409990745070001@192.168.0.77>
In article <37DDC159.B39F7410@vpservices.com>, Jeff Zucker
<jeff@vpservices.com> wrote:
# 1) writing extensions, e.g. I have extensions for all the list type
# methods to combine CGI.pm and DBI.pm so that $q->popup_menu(sql=>"SELECT
# id,partname FROM parts") gives me a nice HTML formated select list based
# on the contents of a database column with the first column as the values
# list and the second as the labels list for the CGI.pm popup_menu.
I am not attacking you here, just trying to understand. What is $q here?
If it is a CGI object that you are overriding, then it is unneccessary ...
you could just have your own popup_menu function that does the same
thing. If it is your own object, then it doesn't apply here, because we
are talking about CGI.pm objects. :)
# Sure, all of those could be accomplished without CGI.pm or without OOP
# style, and they don't perhaps use the deepest aspects of OOP, but they
# do make things easier to write and easier to maintain in a number of
# ways and may even help me do real OOP some day.
I think that is the best and worst thing about CGI.pm's OOP interface: it
introduces people to Perl OOP.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: 14 Sep 1999 07:57:46 -0400
From: gabor@vmunix.com (Gabor)
Subject: Re: where to write perl???
Message-Id: <slrn7tse1p.2if.gabor@vnode.vmunix.com>
In comp.lang.perl.misc, Andy Huang <andy-huang@mindspring.com> wrote :
# when i write C/C++ , i use either Borland or microsoft compiler, but i never
# see any compiler for perl, some one told me develop it under win32, but it
# is going to be extremely difficult without any editor's help. Some one tell
# me to install linux, but i have tried so many times to install linux and
# failed, please tell me a easiet way to develop perl thanx man.
#
The easiest way I found was to use my favourite editor. ;)
------------------------------
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 790
*************************************