[13180] in Perl-Users-Digest
Perl-Users Digest, Issue: 590 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 19 15:07:29 1999
Date: Thu, 19 Aug 1999 12:05:15 -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 Thu, 19 Aug 1999 Volume: 9 Number: 590
Today's topics:
Re: -T mode and "Too late for "-T" option" (Doran)
Re: Avoid splitting quoted strings? <rootbeer@redcat.com>
Re: Avoid splitting quoted strings? <arunas@an!m.org>
Behold-Software? <cutandpastescripts@exl.co.uk>
Re: Bragging about killfiling (Was: New posters to comp (John Stanley)
Re: Bragging about killfiling (Was: New posters to comp (Graham Ashton)
Re: Bragging about killfiling (Was: New posters to comp <kperrier@blkbox.com>
Re: Bragging about killfiling (Was: New posters to comp (David H. Adler)
Re: cannot write description to eventlog da_minch@my-deja.com
Re: CGI FILE UPLOAD (Doran L. Barton)
Re: djgpp, Win98, Perl, and serial port <dchristensen@california.com>
hey everybody. can you help me? <adam1@barak-online.net>
Re: hey everybody. can you help me? (Marcel Grunauer)
How can I connect to NT machine's registry remotely whe <percytam@ctimail.com>
how do i keep output from going to stdout sparky21@my-deja.com
How to use perlcc? Need your help fellas~! <jasper75@chollian.net>
Newbie need help <jyoyoliu@hotmail.com>
Re: Newbie need help (Doran L. Barton)
Re: Newbie need help (Tony Kennick)
Re: OOP in perl - not modules!!! <aqumsieh@matrox.com>
Re: OOP in perl - not modules!!! (Andrew Johnson)
Re: perl + mysql.. (Doran L. Barton)
Re: perl system() <rootbeer@redcat.com>
perl-DBI problem <brazell@bmh.com>
Re: perl-DBI problem (Doran L. Barton)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 19 Aug 1999 18:11:05 GMT
From: doran@NOSPAMrbj.com (Doran)
Subject: Re: -T mode and "Too late for "-T" option"
Message-Id: <37bc4877.53648298@news.brandx.net>
What platform are you running on? Unix or NT?
On 16 Aug 1999 19:14:19 +0200, Gildas PERROT <perrot@francenet.fr>
wrote:
>Hi,
>
>I have that error message :
>
>Too late for "-T" option at webverif.pl line 1.
>
>However I have in line 1 :
>
>#!/usr/bin/perl5 -T
>
>Any idea about that error ?
>
>Thanks in advance for your help. Gildas.
>--
>Gildas PERROT, perrot@francenet.fr __o
>FranceNet, 28 rue Desaix, 75015 Paris ---_ \<,_
>http://www.francenet.fr ---- (_)/ (_)
------------------------------
Date: Thu, 19 Aug 1999 11:28:16 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Avoid splitting quoted strings?
Message-Id: <Pine.GSO.4.10.9908191126460.17303-100000@user2.teleport.com>
On Thu, 19 Aug 1999, Arunas Salkauskas wrote:
> I want to parse an HTML <INPUT> tag, and replace the Value with a
> value from a hash, based on the Name as a Key. There's probably a
> module that does this (any pointers would be appreciated).
HTML::Parser, from CPAN. Consult the module list on CPAN if you need to
find modules. Have fun with Perl!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 19 Aug 1999 12:53:34 -0600
From: "Arunas Salkauskas" <arunas@an!m.org>
Subject: Re: Avoid splitting quoted strings?
Message-Id: <37bc52bc@news.cadvision.com>
Yeah, I dove into that for a bit, but it didn't, at first blush, appear to
do what I wanted. It might facilitate it, but it struck me as a little
heavy handed. I've found it really convenient to simply specify a file name
and a hash, and have a function spit back the HTML will all the fields
filled in. I have a fairly comprehensive pile of modules, and I was also
searching on CPAN.
I'll look at HTML::Parser again
--
- Arunas Salkauskas
High Point Designs
www.highpointdesigns.com
Tom Phoenix wrote in message ...
>On Thu, 19 Aug 1999, Arunas Salkauskas wrote:
>
>> I want to parse an HTML <INPUT> tag, and replace the Value with a
>> value from a hash, based on the Name as a Key. There's probably a
>> module that does this (any pointers would be appreciated).
>
>HTML::Parser, from CPAN. Consult the module list on CPAN if you need to
>find modules. Have fun with Perl!
>
>--
>Tom Phoenix Perl Training and Hacking Esperanto
>Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
>
------------------------------
Date: Thu, 19 Aug 1999 19:39:16 +0100
From: "Cut and Paste Scripts" <cutandpastescripts@exl.co.uk>
Subject: Behold-Software?
Message-Id: <CfYu3.861$iE.21333@stones>
Hi,
**** PLEASE don't morn or have a go, but this question is related to
perl/cgi but isn't a programming question, but please could any one help
me!!! *****
I have downloaded the NT counter from Behold Software, I then found out that
they also have a statistics program called WWWSS (WWW Server Statistics) ,
which I think is freeware.
I have tried to access there site for about 3 weeks and it doesn't work.
Please can anyone send me a zipped copy of the program so I can use it. I
am not asking you to do this illegally, because it is freeware.
Please Help!
Graeme Sandwell
------------------------------
Date: 19 Aug 1999 17:40:06 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Bragging about killfiling (Was: New posters to comp.lang.perl.misc)
Message-Id: <7phfhm$qkc$1@news.NERO.NET>
In article <ylr9l09j7c.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> wrote:
>The only thing that's more annoying than people posting public *plonk*
>notices are the people who then post whole threads discussing how horrible
>public *plonk* messages. Hey guys, discussion of noise is still noise.
The only thing that's more annoying than people who complain about
people who complain about public plonk notices are those who post their
personal scoring file so they can prove to the world that they don't
plonk. Hey guys, discussion of noise is still noise.
>In some effort to bring some signal to a thread on killfiles, here's my
Threads on killfiles, I think, have joined the subject of Godwin's Law
as being thread enders.
------------------------------
Date: 19 Aug 1999 18:05:10 GMT
From: billynospam@mirror.bt.co.uk (Graham Ashton)
Subject: Re: Bragging about killfiling (Was: New posters to comp.lang.perl.misc)
Message-Id: <slrn7rohqm.oqr.billynospam@wing.mirror.bt.co.uk>
In article <7phfhm$qkc$1@news.NERO.NET>, John Stanley wrote:
>
>Threads on killfiles, I think, have joined the subject of Godwin's Law
>as being thread enders.
so what's Godwin's Law?
<duck's swiftly>
--
Graham
------------------------------
Date: 19 Aug 1999 13:36:07 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Bragging about killfiling (Was: New posters to comp.lang.perl.misc)
Message-Id: <97745347F84DCE53.B62BA6BE9160FF63.7B83B4AFDDEA2017@lp.airnews.net>
Ian Clarke <I.Clarke@strs.co.uk> writes:
>
> I am getting pretty sick of this whole killfile thing, particularly
> those who get into an argument, and then half way through killfile the
> person they are arguing with. In my view, this is the most blatant and
> pigheaded way to admit defeat in a debate.
>
Or it is the easiest way to admit that the flame war isn't worth my time
anymore and I do not want to see it.
Killfiles, like good fences, make better neighbors.
Kent
------------------------------
Date: 19 Aug 1999 18:46:59 GMT
From: dha@panix7.panix.com (David H. Adler)
Subject: Re: Bragging about killfiling (Was: New posters to comp.lang.perl.misc)
Message-Id: <slrn7rok93.53t.dha@panix7.panix.com>
In article <7phfhm$qkc$1@news.NERO.NET>, John Stanley wrote:
>Threads on killfiles, I think, have joined the subject of Godwin's Law
>as being thread enders.
Given that even an invocation of Godwin seems not to work, I wouldn't
hold my breath... :-/
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"We Americans stand on the shoulders of freaks." - Doctor Demento
------------------------------
Date: Thu, 19 Aug 1999 18:20:34 GMT
From: da_minch@my-deja.com
Subject: Re: cannot write description to eventlog
Message-Id: <7phhsf$91h$1@nnrp1.deja.com>
In article <MPG.1224aa09fc396e76989c3f@news-server>,
elephant@squirrelgroup.com (elephant) wrote:
> oic .. that's where you map an EventID to an Event string .. you must
> have to provide an entry point for the eventvwr.exe to call into .. I
> wonder how to do THAT in Perl - don't you love new projects *8^)
what vers of perl and nt are you running? for even if i cut and paste
your code i continue to get "system cannot find the file specified."
(i don't want to have to use eventvwr but it would be rather pleasing
to see my remarks with it...) (by the way your help thus far is
appreciated)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 19 Aug 1999 12:33:57 -0600
From: fozz@xmission.xmission.com (Doran L. Barton)
Subject: Re: CGI FILE UPLOAD
Message-Id: <7phiml$bd1$1@xmission.xmission.com>
Jimmy Humphrey <jimmy@blackhole-designs.com> writes:
>Also, where do I get these mod's Image and Compress? I looked up in my
>programming perl book and could not find them listed.
From the CPAN (Comprehensive Perl Archive Network). Go to
<http://www.cpan.org/> to find your nearest CPAN site. CPAN is a Perl
developer's best friend... learn all about it.
The CGI module will be able to handle the mechanics of your file uploading.
Also available from CPAN, if needed.
-=Fozz
--
Doran L. Barton = fozz@xmission.com && http://www.xmission.com/~fozz/
** Dynamic web developer, Perl hacker. Using the Internet since 1990. **
"I have learned much more about Microsoft by using the Linux operating
system than I ever would have done by using Windows." - Neal Stephenson
------------------------------
Date: Thu, 19 Aug 1999 12:05:02 -0700
From: "David Christensen" <dchristensen@california.com>
Subject: Re: djgpp, Win98, Perl, and serial port
Message-Id: <37bc52c7@news5.newsfeeds.com>
<Permission to post obtained from author -- David>
-----Original Message-----
From: Bbirthisel@aol.com <Bbirthisel@aol.com>
To: dchristensen@california.com <dchristensen@california.com>
Date: Tuesday, August 17, 1999 9:01 AM
Subject: Re: djgpp, Win98, Perl, and serial port
In [various messages] Shigenobu Okuyama writes:
|> I found some serial port libraries on GNU sites.
|>
|> - v2tk/bcsio20.zip Bill Currie's Serial Comms Package
|> - v2tk/pmcom10.zip Peter Marinov's serial com port toolkit
|> - v2tk/svas011b.zip Samuel Vincent's serial port library
|> In this weekend, I wrote some extended functions of perl by XS
language which provides only the low level interface to Peter
Marinov's kit. I am trying the functions of sending/receiving a
char. and a string with some perl scripts. That's successful for
now.
A fourth choice!
|> Peter Marinov's kit (uploaded on 98-10-27) is a good one. If
you are interested in it I think you should try to use it. I can
test it now by perl scripts through the low level interface.
|> Last week, I started to write some middle level functions. In
my plan, almost low level functions are arranged to some middle
level functions. These are written by XS language. The low level
functions will be unnecessary in future, which will be hidden to
reduce code size.
|>
|> The middle level functions I wrote are;
|>
|> comopen() open a serial port
|> comclose() close serial ports
|> comsetprm() set transmit parameters of a serial port
|> comgetprm() get transmit parameters of a serial port
|> comwrite() write to a serial port
|> comread() read from a serial port
|> comsetmcr() set MCR (modem control register) of a serial port
|> comgetmsr() get MSR (modem status register) of a serial port
|>
|> I feel the set of these functions is incomplete. Because
simple binary level transmfer can be executed by using comwrite()
and comread(), but text level transmfer requires many cares.
And there are a bunch of timing and buffer management issues as
well. In
his case, he needed a compact (runs on ramdisk or floppy) solution
and
was willing to trade off performance for it. I don't think that is
your
situation.
-----------== 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: Thu, 19 Aug 1999 20:45:36 +0200
From: "adam" <adam1@barak-online.net>
Subject: hey everybody. can you help me?
Message-Id: <37bc41e7.0@news.barak.net.il>
Do you know any Windows software that i design my
script (not coding it but "editing" it (like i don't really write the html
script when i work with FrontPage... ) ?
for html i can use frontpage, for cgi there is cgi*star
but for perl ??
i need something that after i finish my work it uploads all the files to
the server...... do you know any software??
please help me! Adam.
------------------------------
Date: Thu, 19 Aug 1999 17:57:57 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: hey everybody. can you help me?
Message-Id: <37bf51ee.8850286@news>
On Thu, 19 Aug 1999 20:45:36 +0200, "adam" <adam1@barak-online.net>
wrote:
> Do you know any Windows software that i design my
> script (not coding it but "editing" it (like i don't really write the html
> script when i work with FrontPage... ) ?
>
> for html i can use frontpage, for cgi there is cgi*star
> but for perl ??
>
> i need something that after i finish my work it uploads all the files to
> the server...... do you know any software??
> please help me! Adam.
FrontPage, alas, does not output HTML, but garbage. Just use your
favorite text editor (be it Emacs, vi, HomeSite, CodeWright, NotePad
or whatever) for everything and write tools in Perl to upload the
files to where you want.
Do you understand the difference between CGI (all caps) and Perl
(capital P)? CGI is an interface that web servers provide. The server
might be configured to execute a Perl program when it sees a URL
ending in .pl that does something useful (hopefully) and returns the
result to the server, which returns it to the browser. Perl is one of
the languages you can write CGI scripts in, but not the only one. You
can also have shell scripts, VBScript (on Windows anyway) or anything
else that can read environment variables and print text.
But Perl is an elegant language, from the more civilized days. Not as
random or clumsy as VBScript.
HTH
------------------------------
Date: Wed, 18 Aug 1999 15:22:02 +0800
From: "Percy Tam" <percytam@ctimail.com>
Subject: How can I connect to NT machine's registry remotely when using Win32::TieRegistry
Message-Id: <7pdmci$hop1@pegasus.hkstar.com>
Does anyone know what's wrong of the following code fragment:
use Win32::TieRegistry;
$RmtKey=Registry->Connect("testpdc", "LMachine, {Delimiter=>"\"});
#It always return "Can't locate object method "Connect" via package
"Registry" at ..."
------------------------------
Date: Thu, 19 Aug 1999 17:35:38 GMT
From: sparky21@my-deja.com
Subject: how do i keep output from going to stdout
Message-Id: <7phf8k$6rf$1@nnrp1.deja.com>
I have a program that returns the output of sp_sysmon to the terminal
even though I have not called print. How can I redirect the stdout in
the beginning of my program so that everything that would go to the
screen goes to an array??
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 20 Aug 1999 03:33:34 +0900
From: "Kang, Tae-jin" <jasper75@chollian.net>
Subject: How to use perlcc? Need your help fellas~!
Message-Id: <37BC4DFE.A89D6863@chollian.net>
I tried to compile my perl scripts with perlcc.
A simple script was compiled well. But when I compiled the scripts that
contains perl modules and my library files, there were several errors!!!
I have tested on two systems, one was the system that has perl compiled
with static way, and the other was the machine with perl compiled that
supports dynamic loading support. Both failed.
I don't know how to compile... pls help me.
my script starts like the following:
#!/usr/bin/perl
use CGI;
use DBI;
require "mylib.lib";
require "myconfig.conf";
..........
......
and there were two cases:
[CASE 1]
root>perlcc info_admin.pl
........
.........
it compiled successfully, but when I executed the compiled binary, an
error occurred!!!
error message was like this:Can't load module IO, dynamic loading not
available in this perl.
(You may need to build a new perl executable which either supports
dynamic loading or has the IO module statically linked into it.)
at /usr/lib/perl5/5.00503/i686-linux/IO/Handle.pm line 248
BEGIN failed--compilation aborted at
/usr/lib/perl5/5.00503/i686-linux/IO/Seekable.pm line 50.
BEGIN failed--compilation aborted at
/usr/lib/perl5/5.00503/i686-linux/IO/File.pm line 111.
BEGIN failed--compilation aborted at ./lib/Lite.pm line 141.
Q> Do I need to compile perl again to set the dynamic autoloading
features?
What are those messages 'BEGIN failed.....'?
[CASE 2]
I couldn't even compiled the scipts...
root>perlcc info_admin.pl
Making C(info_admin.pl.c) for info_admin.pl!
perl -I/usr/local/lib/perl5/5.00557/i686-linux
-I/usr/local/lib/perl5/5.00557
-I/usr/local/lib/perl5/site_perl/5.00557/i686-linux
-I/usr/local/lib/perl5/site_perl/5.00557 -I. -MB::Stash -c
info_admin.pl
perl -I/usr/local/lib/perl5/5.00557/i686-linux
-I/usr/local/lib/perl5/5.00557
-I/usr/local/lib/perl5/site_perl/5.00557/i686-linux
-I/usr/local/lib/perl5/site_perl/5.00557 -I.
-MO=CC,-umain,-uAutoLoader,-uDB,-uDBI,-uDBI::dr,-uDBI::var,-uDBI::DBI_tie,-uDBI::st,-uDBI::db,-uConfig,-uExporter,-uExporter::Heavy,-uCGI,-uApache,-uDBD,-uDBD::_,-uDBD::_::st,-uDBD::_::common,-uDBD::_::db,-uDBD::_::dr,-uDBD::Switch,-uDBD::Switch::st,-uDBD::Switch::db_mem,-uDBD::Switch::dr_mem,-uDBD::Switch::db,-uDBD::Switch::dr,-uDBD::Switch::st_mem,-uDBD::_mem,-uDBD::_mem::st,-uDBD::_mem::common,-uDBD::_mem::db,-uDBD::_mem::dr,-ustrict,-uVMS,-uVMS::Filespec,-uBenchmark,-uTempFile,-uFh,-uoverload,-uMultipartBuffer,-uvars,-uCarp,-uFile,-uFile::Spec,-uMacPerl,-oinfo_admin.pl.c
info_admin.pl
info_admin.pl syntax OK
DBD::_mem::db saved (it is in DBD::Switch::db_mem's @ISA)
DBD::_mem::common saved (it is in DBD::_mem::db's @ISA)
..................
..........
deleting SelectSaver.pm at
/usr/local/lib/perl5/5.00557/i686-linux/B/C.pm line 1265.
Saving methods
No definition for sub Fh::asString
No definition for sub Fh::asString (unable to autoload)
No definition for sub Fh::compare
No definition for sub Fh::compare (unable to autoload)
Compiling C(info_admin) for info_admin.pl!
perl -I/usr/local/lib/perl5/5.00557/i686-linux
-I/usr/local/lib/perl5/5.00557
-I/usr/local/lib/perl5/site_perl/5.00557/i686-linux
-I/usr/local/lib/perl5/site_perl/5.00557 -I. /tmp/info_admin.pl.tst
gcc -Dbool=char -DHAS_BOOL
-I/usr/local/lib/perl5/5.00557/i686-linux/CORE
/usr/local/lib/perl5/site_perl/5.00557/i686-linux/auto/DBI/DBI.so
/usr/local/lib/perl5/5.00557/i686-linux/auto/IO/IO.so
/usr/local/lib/perl5/5.00557/i686-linux/auto/Fcntl/Fcntl.so -o
info_admin info_admin.pl.c
/usr/local/lib/perl5/5.00557/i686-linux/auto/DynaLoader/DynaLoader.a
-L/usr/local/lib -L/usr/local/lib/perl5/5.00557/i686-linux/CORE -lperl
-lnsl -lndbm -ldb -ldl -lm -lc -lposix -lcrypt
info_admin.pl.c: In function `perl_init':
.................
..................
info_admin.pl.c:25097: warning: passing arg 4 of `Perl_sv_magic' from
incompatible pointer type
info_admin.pl.c:28537: warning: assignment from incompatible pointer
type
/tmp/cca176181.o(.data+0x37e90): undefined reference to
`XS_DBI_SQL_WCHAR'
/tmp/cca176181.o(.data+0x37edc): undefined reference to
`XS_DBI__debug_dispatch'
/tmp/cca176181.o(.data+0x37f28): undefined reference to
`XS_DBI_SQL_DATE'
/tmp/cca176181.o(.data+0x37fc0): undefined reference to
`XS_DBI_SQL_FLOAT'
/tmp/cca176181.o(.data+0x38058): undefined reference to
`XS_DBI_SQL_VARBINARY'
/tmp/cca176181.o(.data+0x380a4): undefined reference to
`XS_DBI__dr_disconnect_all'
/tmp/cca176181.o(.data+0x380f0): undefined reference to
`XS_DBI__dr_data_sources'
/tmp/cca176181.o(.data+0x3813c): undefined reference to
`XS_DBI__dr_FIRSTKEY'
/tmp/cca176181.o(.data+0x38188): undefined reference to
`XS_DBI__dr_event'
/tmp/cca176181.o(.data+0x381d4): undefined reference to
`XS_DBI__dr_func'
/tmp/cca176181.o(.data+0x38220): undefined reference to
`XS_DBI__dr_trace_msg'
/tmp/cca176181.o(.data+0x3826c): undefined reference to
`XS_DBI__dr_DESTROY'
/tmp/cca176181.o(.data+0x382b8): undefined reference to
`XS_DBI__dr_FETCH'
/tmp/cca176181.o(.data+0x38304): undefined reference to
`XS_DBI__dr_errstr'
/tmp/cca176181.o(.data+0x38350): undefined reference to
`XS_DBI__dr_trace'
/tmp/cca176181.o(.data+0x3839c): undefined reference to
`XS_DBI__dr_connect_cached'
/tmp/cca176181.o(.data+0x383e8): undefined reference to
`XS_DBI__dr_default_user'
/tmp/cca176181.o(.data+0x38434): undefined reference to
`XS_DBI__dr_connect'
.............
.........
......
....
..
./tmp/cca176181.o(.data+0x3b400): undefined reference to
`XS_DBD_____st_fetchrow_arrayref'
/tmp/cca176181.o(.data+0x3b9a4): undefined reference to
`XS_DBD_____common_debug'
ERROR: In compiling code for info_admin.pl.c !
Q>this error happened with the perl supports dynamic autoloading. Gees,
What's wrong with this?
thanx for reading.
and thanx in advance~ :)
------------------------------
Date: Thu, 19 Aug 1999 12:47:17 -0500
From: "James Liu" <jyoyoliu@hotmail.com>
Subject: Newbie need help
Message-Id: <UnXu3.1336$PY.113993@news.corecomm.net>
How do I create a new file?
I looked through the Llama book, not there
I looked at the FAQ and the manpages, couldn't find anything
I cannot afford the Camel book. I'm dead broke.
I'm working on the command line of Win98.
------------------------------
Date: 19 Aug 1999 12:38:15 -0600
From: fozz@xmission.xmission.com (Doran L. Barton)
Subject: Re: Newbie need help
Message-Id: <7phiun$btl$1@xmission.xmission.com>
"James Liu" <jyoyoliu@hotmail.com> writes:
>How do I create a new file?
>I looked through the Llama book, not there
>I looked at the FAQ and the manpages, couldn't find anything
>I cannot afford the Camel book. I'm dead broke.
Use the open() function/sub to do this.
open FILEHANDLE, ">/path/to/file" or
die "Could not open file for writing";
Don't forget to close it when you're done.
close FILEHANDLE;
Good luck. Check out the 'perldoc' command. Do a 'perldoc -f open' for more
reference on the open() function.
-=Fozz
--
Doran L. Barton = fozz@xmission.com && http://www.xmission.com/~fozz/
** Dynamic web developer, Perl hacker. Using the Internet since 1990. **
"I have learned much more about Microsoft by using the Linux operating
system than I ever would have done by using Windows." - Neal Stephenson
------------------------------
Date: Thu, 19 Aug 1999 18:56:32 GMT
From: tony@showroom.org.uk (Tony Kennick)
Subject: Re: Newbie need help
Message-Id: <37bc5251.24250106@missy.shef.ac.uk>
"James Liu" <jyoyoliu@hotmail.com> imparted the following:
:->How do I create a new file?
:->
:->I looked through the Llama book, not there
:->I looked at the FAQ and the manpages, couldn't find anything
:->I cannot afford the Camel book. I'm dead broke.
:->
:->I'm working on the command line of Win98.
Well from the command line
perldoc -f open
displays the documentation of the open function, the second paragraph
deals with what you want.
--
From Tony Kennick aka Gonzo The Great
http://missy.shef.ac.uk/users/old-firm/
Gonzo: Slang for "the last man standing
at a drinking marathon"
------------------------------
Date: Thu, 19 Aug 1999 11:04:45 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: OOP in perl - not modules!!!
Message-Id: <x3yk8qrdd6b.fsf@tigre.matrox.com>
prasad@chetana.com writes:
> Should the class pm files be created using h2xs or is it only for
> creating CPAN type modules?
h2xs is mainly used to create extensions. You can use it to create
modules (classes), but only if you want your real code to be in C,
with a Perl wrapper that calls the appropriate compiled C
functions. See perlxstut for more details.
I don't use it to create my modules, which are pure Perl. You can
learn more about modules in Perl by reading perlmod, perlmodlib,
perltoot, perlobj and perlbots.
> If I should type the classes in normal files myself and h2xs is not
> necessary, what should be the file extension?
.pm ... The name of your package (class) should be the same as the
name of your file (without the extension). For example, if you want to
create a package called Animal, you would create a file called
Animal.pm. One of the first lines in that file (usually) would be:
package Animal;
To create an object of this class, you need first to 'use Animal;' in
your script. Make sure that Animal.pm resides somewhere where Perl can
find it.
> How do I distribute various classes in diff. files? can I include
> multiple classes a single file?
You can do both. Read more on Perl's modules in the perldocs I
mentioned above.
Another good source of info (docs and real-life examples) would be the
Ram (the Perl CookBook), written by Christiansen and Torkington,
published by O'Reilly.
> I can't understand how to write ,let's say a csv file add,modify,delete
> program that uses the CSV DBD module to carry out the file access
> tasks
> in perl. I also don't know where to get such a small sample program.
In the Ram, there are several recipes to manipulate CSV's.
> I think that the complete style of OOP and not the reusable CPAN
> modules,the standard set of lines at the start of a typical class,the
> controlling program format(similar to one containing main() in c++) etc.
> needs to explained in a well paced man page by some perlwiz.
There is plenty of documentation already. Check out Ram:12 (that is
tchrist's new notation meaning chapter 12 of the Ram), entitled
"Packages, Libraries, and Modules", as well as Ram:13 "Classes, Object,
and Ties."
There are also chapters 6, 7 and 8 of the Panther.
Docs are plenty.
HTH,
Ala
------------------------------
Date: Thu, 19 Aug 1999 18:00:24 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: OOP in perl - not modules!!!
Message-Id: <YCXu3.5735$dr6.122682@news1.rdc2.on.home.com>
In article <x3yk8qrdd6b.fsf@tigre.matrox.com>,
Ala Qumsieh <aqumsieh@matrox.com> wrote:
!
! prasad@chetana.com writes:
!
! > Should the class pm files be created using h2xs or is it only for
! > creating CPAN type modules?
!
! h2xs is mainly used to create extensions. You can use it to create
! modules (classes), but only if you want your real code to be in C,
! with a Perl wrapper that calls the appropriate compiled C
! functions. See perlxstut for more details.
h2xs is not just for creating C extenstions---it can also be used as
a simple method of creating a skeleton module along with extra files
for making a standard distribution package.
$ h2xs -Xn Foo
Writing Foo/Foo.pm
Writing Foo/Makefile.PL
Writing Foo/test.pl
Writing Foo/Changes
Writing Foo/MANIFEST
Now all you need do is fill in Foo.pm, add some tests if appropriate
and possibly edit Makefile.PL if you want something beyond a generic
installation. see man h2xs for more details.
regards
andrew
------------------------------
Date: 19 Aug 1999 12:53:26 -0600
From: fozz@xmission.xmission.com (Doran L. Barton)
Subject: Re: perl + mysql..
Message-Id: <7phjr6$e34$1@xmission.xmission.com>
"Teru" <mtlam@hongkong.com> writes:
>I'm going to write a program in perl to show out the databases, tables and
>indexes of my MySQL databases, so that I can select databases and datas
>through the web browser.
>But I don't have any idea on how to do it ?
>Does anyone know how ?
>please give me some examples and informations. Thanks a lot.
There is a Perl module DBI.pm which abstracts access to many database
backends into a single interface. Once you have DBI.pm (available from any
CPAN site <http://www.cpan.org/>), then you need to get the DBD (DBI
Driver) file for the database backend you're using (in this case, MySQL).
Once you have both installed, you'll do something like this:
use DBI;
$dbh = DBI->connect("dbi:mysql:dbname") or
die "Could not connect to the database!";
$sth = $dbh->prepare("select * from table_one");
$rv = $sth->execute;
if($rv) {
for(1..$rv) {
$row= $sth->fetchrow_hashref;
print
"Name: $row->{name}\n",
"Address: $row->{address}\n";
}
}
$dbh->disconnect;
See the DBI manpage (type 'perldoc DBI') for a complete set of information
on how to use DBI functions like prepare(), do() and execute().
-=Fozz
--
Doran L. Barton = fozz@xmission.com && http://www.xmission.com/~fozz/
** Dynamic web developer, Perl hacker. Using the Internet since 1990. **
"I have learned much more about Microsoft by using the Linux operating
system than I ever would have done by using Windows." - Neal Stephenson
------------------------------
Date: Thu, 19 Aug 1999 11:26:09 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: perl system()
Message-Id: <Pine.GSO.4.10.9908191124150.17303-100000@user2.teleport.com>
On Thu, 19 Aug 1999, stefan wrote:
> After this command the process is started, but it doesn't do anything,
> nothing is written in the nohup.out either.
Maybe you're not waiting long enough. It semlls like buffering to me. See
$| in perlvar. Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 19 Aug 1999 17:55:04 GMT
From: warmongr <brazell@bmh.com>
Subject: perl-DBI problem
Message-Id: <7phgcu$7p3$1@nnrp1.deja.com>
Perhaps the wrong forum for this however, I am at my wits end.
When trying to load DBI.so from a script I get the following message:
----
Can't load '/usr/lib/perl5/5.00503/i386-linux/auto/DBI/DBI.so' for
module DBI: /usr/lib/perl5/5.00503/i386-linux/auto/DBI/DBI.so: undefined
symbol: dirty at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line
169.
at ./list.pl line 3
BEGIN failed--compilation aborted at ./list.pl line 3.
----
I previously had DBI up and running on a RH5.2 using
perl-5_004m4-1_i386.rpm.
RH 6.0 ships with perl-5_00503-4_i386.rpm. The default directory under
perl-5_004... was /usr/lib/perl5/site_perl (this is where DBI loads)
the default directory for perl-5_00503... is /usr/lib/perl5/5.00503/
@INC does not contain /usr/lib/perl5/site_perl so I copied all related
files from site_perl to 5.00503 directory and not get the above error
message. Can anyone help figure this out. I have looked high and low
across deja news and find very few messages regarding this.
Anyone else having this problem. I have heard that switching back to
the old perl (5_004m4-1_i386.rpm) was a fix, however I have other things
relying on the new version of perl that ships with RH6.0
Bahhhhh!
war...
--
"If there's a new way... I'll be the first in line", MEGADETH
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 19 Aug 1999 12:55:17 -0600
From: fozz@xmission.xmission.com (Doran L. Barton)
Subject: Re: perl-DBI problem
Message-Id: <7phjul$ect$1@xmission.xmission.com>
warmongr <brazell@bmh.com> writes:
>When trying to load DBI.so from a script I get the following message:
>----
>Can't load '/usr/lib/perl5/5.00503/i386-linux/auto/DBI/DBI.so' for
>module DBI: /usr/lib/perl5/5.00503/i386-linux/auto/DBI/DBI.so: undefined
>symbol: dirty at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line
>169.
> at ./list.pl line 3
>BEGIN failed--compilation aborted at ./list.pl line 3.
>----
>I previously had DBI up and running on a RH5.2 using
>perl-5_004m4-1_i386.rpm.
Personally, I'd just grab the DBI module package from a closeby CPAN site
and re-make it and install it.
-=Fozz
--
Doran L. Barton = fozz@xmission.com && http://www.xmission.com/~fozz/
** Dynamic web developer, Perl hacker. Using the Internet since 1990. **
"I have learned much more about Microsoft by using the Linux operating
system than I ever would have done by using Windows." - Neal Stephenson
------------------------------
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 590
*************************************