[22249] in Perl-Users-Digest
Perl-Users Digest, Issue: 4470 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 27 03:06:54 2003
Date: Mon, 27 Jan 2003 00:05:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 27 Jan 2003 Volume: 10 Number: 4470
Today's topics:
ANNOUNCE: DBIx::Hash2Table V 1.02 <ron@savage.net.au>
ANNOUNCE: DBIx::Table2Hash V 1.11 <ron@savage.net.au>
Re: How to make standalone perlscript (Randal L. Schwartz)
Re: How to make standalone perlscript (Randal L. Schwartz)
Need Perl Web-based email script <Jean_member@newsguy.com>
Re: perl code to "fix" VBR mp3s with bogus time informa <lockner@cse.psu.edu>
Re: perl code to "fix" VBR mp3s with bogus time informa (Malcolm Dew-Jones)
problems with full text search in joined database--- ne (foote)
Re: problems with full text search in joined database-- <GPatnude@adelphia.net>
Re: problems with full text search in joined database-- <GPatnude@adelphia.net>
Re: problems with full text search in joined database-- <koos_pol@NO.nl.JUNK.compuware.MAIL.com>
Re: problems with full text search in joined database-- <koos_pol@NO.nl.JUNK.compuware.MAIL.com>
Re: script <koos_pol@NO.nl.JUNK.compuware.MAIL.com>
Re: To create a static html page with perl script from (Jim Carter)
Re: totally newbie question <family2@aracnet.com>
Re: totally newbie question <lockner@cse.psu.edu>
Re: totally newbie question (Tad McClellan)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 27 Jan 2003 10:16:31 +1100
From: "Ron Savage" <ron@savage.net.au>
Subject: ANNOUNCE: DBIx::Hash2Table V 1.02
Message-Id: <3e347aa5$1_8@news.teranews.com>
This pure Perl module is available immediately from CPAN, or from
http://savage.net.au/Perl-modules.html
This latter site also contains instructions for installing any Perl module
from a Unix-style or ActiveState-style distro.
Changes:
1.02 Sun Jan 26 10:43:00 2003
- Fix bug for where user specifies more than 1 'extra' column in the
'columns' parameter
- Add extra columns to the table created by examples/test-hash2table.pl, in
preparation for using the same table with the demo for DBIx::Table2Hash
- Extend test-hash2table.pl to read back in and print the table created
- Update docs
------------------------------
Date: Mon, 27 Jan 2003 10:17:31 +1100
From: "Ron Savage" <ron@savage.net.au>
Subject: ANNOUNCE: DBIx::Table2Hash V 1.11
Message-Id: <3e347a8d$1_3@news.teranews.com>
This pure Perl module is available immediately from CPAN, or from
http://savage.net.au/Perl-modules.html
This latter site also contains instructions for installing any Perl module
from a Unix-style or ActiveState-style distro.
Changes:
1.11 Sun Jan 26 12:28:00 2003
- Add method select_tree(), which reads a table into a nested hash, ie a
tree.
This tree is suitable for inputting into CGI::Explorer V 2.00
(forthcoming), as long as the tree has a single root.
Note: select_tree() is an alternative to the fine module DBIx::Tree
- Add a new demo, test-table2tree.pl, to demonstrate select_tree().
Note: The database table for this demo is created by test-hash2table.pl,
the demo which ships with DBIx::Hash2Table
- Fix bug so select_hashref() - and now select_tree() - can take an SQL
expression for the value of the key_column parameter.
Previously, only select() would work when you tried this.
- Update docs
------------------------------
Date: 26 Jan 2003 14:53:45 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: How to make standalone perlscript
Message-Id: <868yx7o746.fsf@red.stonehenge.com>
>>>>> "William" == William Hymen <t18_pilot@hotmail.spam.com> writes:
William> I need to distribute a standalone perlscript
William> "tarfile.pl" in my company. It bundles a directory
William> tree into a tarfile. I do not want to run around and
William> install Perl or the GNU toolset everywhere.
See PAR in the CPAN.
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 26 Jan 2003 14:54:39 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: How to make standalone perlscript
Message-Id: <864r7vo72o.fsf@red.stonehenge.com>
>>>>> "Michael" == Michael Peuser \(h\) <Michael> writes:
Michael> If you are willing to spend money look at:
Michael> - www.activestate.com for PerlApp
Michael> - www.indigostar.com for Perl3Exe
No. Don't spend money. PAR in the CPAN.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 26 Jan 2003 15:27:46 -0800
From: Jean Andre Vallery <Jean_member@newsguy.com>
Subject: Need Perl Web-based email script
Message-Id: <b11qti01u2i@drn.newsguy.com>
I'm trying to access my email on two domains on red hat and apache server.
I'm running sendmail and python app called mailman. I would like to access the
servers email without being at the server. I checked perl.org and
cgi-resources.com .
Anyone have a tried and true simple, and semi-secure perl script?
Thank you
Jean Andre Vallery
Sarasota, Florida
www.2453.net
JeanVallery@BicycleMessenger.com
------------------------------
Date: Sun, 26 Jan 2003 13:02:07 -0500
From: Matthew Lockner <lockner@cse.psu.edu>
Subject: Re: perl code to "fix" VBR mp3s with bogus time information?
Message-Id: <b117qv$1gb8$1@f04n12.cac.psu.edu>
Did you already check CPAN? Try going to http://search.cpan.org/ and
entering "VBR" as your query to pull up a list of possibly-relevant
modules. Looks like MP3::Info and Audio::MPEG might be worth a look. If
nothing helps, you can always try to write the code you want yourself (and
if it actually works, think about putting it in CPAN).
------------------------------
Date: 26 Jan 2003 19:48:25 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: perl code to "fix" VBR mp3s with bogus time information?
Message-Id: <3e34ac09@news.victoria.tc.ca>
scott evans :: www.antisleep.com wrote
.Some Fraunhoffer-based mp3 encoders put bogus song length information
.in the encoded mp3 when you use VBR. There's a Windows program called
."vbrfix" to correct this problem:
. http://www.willwap.btinternet.co.uk/programs/vbrfix.htm
.But I'll really like to do it using perl. Anyone know of any existing
.code?
and then Matthew Lockner (lockner@cse.psu.edu) wrote:
: Did you already check CPAN? Try going to http://search.cpan.org/ and
: entering "VBR" as your query to pull up a list of possibly-relevant
: modules. Looks like MP3::Info and Audio::MPEG might be worth a look.
(and then I wrote)
Did you look at these modules? They don't seem to mention anything about
fixing bogus data.
If
: nothing helps, you can always try to write the code you want yourself (and
: if it actually works, think about putting it in CPAN).
I think that was what he was trying to avoid having to do. A key item
here is that he can't write this code without knowing how to solve the
bogus data problem.
------------------------------
Date: 26 Jan 2003 16:40:27 -0800
From: tjfoote@worldnet.att.net (foote)
Subject: problems with full text search in joined database--- newbie question
Message-Id: <63fdec0c.0301261640.a15c80e@posting.google.com>
i'm trying to join 2 databases together and doing a text search
on them:
i'm using mysql 3.3 on a unix server...and using perl..
there are 9 records in the commentl and about 400 in the remedytbl2
tables..
when i run the sql querry 1 searching for "acne" i get all the
9 records and 0 records from the remedytbl2.
whereas i should be getting 0 records from
commentbl and 19 records from remedytbl2 Also none of the
9 commentbl records have "acne in them..
However if i run sql query 2...where i just perform
a text search on the remedytbl2 table for "acne" in the text i
get all 19 records where "acne" is in the text...
OK... what am i doing wrong here...
any suggestions???
the mysql statement i'm using is:
--------------------------sql querry 1 ------------------------
this returns all 9 records in commentbl and doesn't return the
recordes in remedytbl2...
$xsearch_words = "acne";
$statement = qq[ select distinct
remedytbl2.remedy_file_id,
remedytbl2.remedy_date_submission,
remedytbl2.remedy_title,
from remedytbl2, commentbl
where
(remedytbl2.remedy_file_id =
commentbl.com_rem_file_id)
and ( match (remedy_title,Subject_classified,
remedytbl2.author_name, browse_text, remedy_des_text)
against ('$xsearch_words') >= 0
or match (comment_title,
commentbl.author_name,
comment_des_text)
against ('$xsearch_words') >= 0 )
order by remedytbl2.remedy_date_submission limit 0, 25 ];
--------------------------sql querry 2 ------------------------
this statement works fine..and returns 19 records in the remedydb2
$xsearch_words = "acne";
$statement = qq[ select
remedytbl2.remedy_file_id,
remedytbl2.remedy_date_submission,
remedytbl2.remedy_title,
from remedytbl2
where
match (remedy_title,Subject_classified,
remedytbl2.author_name, browse_text, remedy_des_text)
against ('$xsearch_words') >= 0
order by remedytbl2.remedy_date_submission
limit 0, 25 ];
------------------------------
Date: Mon, 27 Jan 2003 00:44:35 GMT
From: "codeWarrior" <GPatnude@adelphia.net>
Subject: Re: problems with full text search in joined database--- newbie question
Message-Id: <Th%Y9.4951$ni5.1423890@news1.news.adelphia.net>
"foote" <tjfoote@worldnet.att.net> wrote in message
news:63fdec0c.0301261640.a15c80e@posting.google.com...
> i'm trying to join 2 databases together and doing a text search
> on them:
>
> i'm using mysql 3.3 on a unix server...and using perl..
> there are 9 records in the commentl and about 400 in the remedytbl2
> tables..
>
> when i run the sql querry 1 searching for "acne" i get all the
> 9 records and 0 records from the remedytbl2.
> whereas i should be getting 0 records from
> commentbl and 19 records from remedytbl2 Also none of the
> 9 commentbl records have "acne in them..
>
> However if i run sql query 2...where i just perform
> a text search on the remedytbl2 table for "acne" in the text i
> get all 19 records where "acne" is in the text...
>
> OK... what am i doing wrong here...
> any suggestions???
>
>
> the mysql statement i'm using is:
>
>
> --------------------------sql querry 1 ------------------------
> this returns all 9 records in commentbl and doesn't return the
> recordes in remedytbl2...
>
> $xsearch_words = "acne";
>
> $statement = qq[ select distinct
>
>
>
> remedytbl2.remedy_file_id,
> remedytbl2.remedy_date_submission,
>
> remedytbl2.remedy_title,
>
> from remedytbl2, commentbl
>
>
> where
> (remedytbl2.remedy_file_id =
> commentbl.com_rem_file_id)
>
> and ( match (remedy_title,Subject_classified,
> remedytbl2.author_name, browse_text, remedy_des_text)
>
> against ('$xsearch_words') >= 0
>
> or match (comment_title,
> commentbl.author_name,
> comment_des_text)
>
> against ('$xsearch_words') >= 0 )
> order by remedytbl2.remedy_date_submission limit 0, 25 ];
>
>
>
> --------------------------sql querry 2 ------------------------
> this statement works fine..and returns 19 records in the remedydb2
>
>
> $xsearch_words = "acne";
>
> $statement = qq[ select
>
> remedytbl2.remedy_file_id,
> remedytbl2.remedy_date_submission,
>
> remedytbl2.remedy_title,
>
> from remedytbl2
>
> where
>
> match (remedy_title,Subject_classified,
> remedytbl2.author_name, browse_text, remedy_des_text)
>
> against ('$xsearch_words') >= 0
>
>
> order by remedytbl2.remedy_date_submission
> limit 0, 25 ];
------------------------------
Date: Mon, 27 Jan 2003 00:46:17 GMT
From: "codeWarrior" <GPatnude@adelphia.net>
Subject: Re: problems with full text search in joined database--- newbie question
Message-Id: <tj%Y9.4952$ni5.1424305@news1.news.adelphia.net>
"foote" <tjfoote@worldnet.att.net> wrote in message
news:63fdec0c.0301261640.a15c80e@posting.google.com...
> i'm trying to join 2 databases together and doing a text search
> on them:
>
SNIP
read up on the MATCH aggregate in mySQL -- The problem is your query...
You need to have something like
SELECT MATCH(field)
WHERE MATCH (field LIKE "%criteria%") ....
------------------------------
Date: Mon, 27 Jan 2003 08:19:58 +0100
From: Koos Pol <koos_pol@NO.nl.JUNK.compuware.MAIL.com>
Subject: Re: problems with full text search in joined database--- newbie question
Message-Id: <newscache$3v3d9h$3gg$1@news.emea.compuware.com>
foote wrote (Monday 27 January 2003 01:40):
> i'm trying to join 2 databases together and doing a text search
> on them:
>
> i'm using mysql 3.3 on a unix server...and using perl..
> there are 9 records in the commentl and about 400 in the remedytbl2
> tables..
>
> when i run the sql querry 1 searching for "acne" i get all the
> 9 records and 0 records from the remedytbl2.
> whereas i should be getting 0 records from
> commentbl and 19 records from remedytbl2 Also none of the
> 9 commentbl records have "acne in them..
>
> However if i run sql query 2...where i just perform
> a text search on the remedytbl2 table for "acne" in the text i
> get all 19 records where "acne" is in the text...
>
> OK... what am i doing wrong here...
> any suggestions???
>
>
> the mysql statement i'm using is:
This is what is left over if I remove all SQL stuff and only keep the Perl
related:
> $xsearch_words = "acne";
> $statement = qq[...];
> $xsearch_words = "acne";
> $statement = qq[...];
I don't see any Perl errors here. So you better check your SQL.
--
KP
------------------------------
Date: Mon, 27 Jan 2003 08:19:58 +0100
From: Koos Pol <koos_pol@NO.nl.JUNK.compuware.MAIL.com>
Subject: Re: problems with full text search in joined database--- newbie question
Message-Id: <newscache$a13d9h$zfg$1@news.emea.compuware.com>
foote wrote (Monday 27 January 2003 01:40):
> i'm trying to join 2 databases together and doing a text search
> on them:
>
> i'm using mysql 3.3 on a unix server...and using perl..
> there are 9 records in the commentl and about 400 in the remedytbl2
> tables..
>
> when i run the sql querry 1 searching for "acne" i get all the
> 9 records and 0 records from the remedytbl2.
> whereas i should be getting 0 records from
> commentbl and 19 records from remedytbl2 Also none of the
> 9 commentbl records have "acne in them..
>
> However if i run sql query 2...where i just perform
> a text search on the remedytbl2 table for "acne" in the text i
> get all 19 records where "acne" is in the text...
>
> OK... what am i doing wrong here...
> any suggestions???
>
>
> the mysql statement i'm using is:
This is what is left over if I remove all SQL stuff and only keep the Perl
related:
> $xsearch_words = "acne";
> $statement = qq[...];
> $xsearch_words = "acne";
> $statement = qq[...];
I don't see any Perl errors here. So you better check your SQL.
--
KP
------------------------------
Date: Mon, 27 Jan 2003 08:13:28 +0100
From: Koos Pol <koos_pol@NO.nl.JUNK.compuware.MAIL.com>
Subject: Re: script
Message-Id: <newscache$gq2d9h$yfg$1@news.emea.compuware.com>
Pons wrote (Sunday 26 January 2003 07:34):
> Greetings
> I am gonna switch to new AIX Orcale system with load balance,
> due to that I have to change the Alias and HOST IP in all
> tnsnames files (tnsname.txt) of my Win2k remote users,
> I do not want to do it manually. I want to write a script
> to search for tnsnames file tnsnames.txt on remote windows
> win2k machines C: and D: and replace it with a new tnsnames,
If you have a large environment with many Oracle clients and therefor many
tnsnames.ora's you are much, much better of by sharing these files from a
file server or fetch them (at the client) from a file server during the
login process.
--
KP
------------------------------
Date: 26 Jan 2003 22:19:34 -0800
From: carterave@yahoo.com (Jim Carter)
Subject: Re: To create a static html page with perl script from the command line...
Message-Id: <9c2a26b6.0301262219.76f8fcce@posting.google.com>
Chas,
Thanks for your reply. The code I gave in my earlier script does the
following:
It reads the input from the file (names.txt) and splits the fields by
tab and shows in a web page with Names on the left side and the
Corresponding Files on the right side in the table.
Would you pl. tell me how I would my second script (test2.pl) would
write the html page to a local file and call the IE browser?
Thanks,
JC
> You could write a new script "test2.pl" which you call from the command
> prompt. This script would write the html to a local file and then call
> the IE browser on that local file (e.g. using "system"). (I think that's
> what you seem to want.)
> [By the way, in your code:
> foreach (@array)
> {
> ($key, $files);
>
> ($key,$files) = split (/\t/);
> ......
> what is the purpose of the first line in the block?]
> chas
------------------------------
Date: Sun, 26 Jan 2003 14:57:43 -0600
From: Abernathey Family <family2@aracnet.com>
Subject: Re: totally newbie question
Message-Id: <3E344BC7.7CC52384@aracnet.com>
Mattias wrote:
>
> Hi I´m totally new at this. I found a free perl script that saves text
> into a text file names_file.txt.
>
> Heres the code:
> ___________________
> #!/usr/bin/perl
> #save_file.pl
> read(STDIN, $buffer,$ENV{'CONTENT_LENGTH'});
> $buffer =~ tr/+/ /;
> $buffer =~ s/\r/ /g;
> $buffer =~ s/\n/ /g;
> @pairs = split(/&/,$buffer);
> foreach $pair(@pairs){
> ($key,$value)=split(/=/,$pair);
> $formdata{$key}.="$value";
> }
> $first=$formdata{'first'};
> $last=$formdata{'last'};
>
> open(INFO, ">>names_file.txt"); # Open for appending
--snip--
Change the ">>" to ">".
Have fun!
-Don
------------------------------
Date: Sun, 26 Jan 2003 16:14:24 -0500
From: Matthew Lockner <lockner@cse.psu.edu>
Subject: Re: totally newbie question
Message-Id: <b11j3g$10rk$1@f04n12.cac.psu.edu>
Mattias wrote:
>
> This works fine but I want to delete everything in the text file
> before the new text gets there. Not append it like it does know. How
> do I do?
> open(INFO, ">>names_file.txt"); # Open for appending
Just use one less > in your filename string:
open(INFO, ">names_file.txt"); # Open without appending
Refer to relevant docs:
perldoc perlopentut
perldoc perlfunc
for the full story.
------------------------------
Date: Sun, 26 Jan 2003 16:45:49 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: totally newbie question
Message-Id: <slrnb38p8t.utq.tadmc@magna.augustmail.com>
Tassilo v. Parseval <tassilo.parseval@post.rwth-aachen.de> wrote:
> Subject: totally newbie question
>
> Please spend a little more time with finding a meaningful subject. This
> one is useless, to put it mildly.
Please also see the Posting Guidelines that are posted here frequently:
http://mail.augustmail.com/~tadmc/clpmisc.shtml
>> Hi I´m totally new at this. I found a free perl script that saves text
>> into a text file names_file.txt.
>
> Unfortunately, free is often synonym to cargo cult.
In case the OP doesn't know what that term means:
http://www.catb.org/~esr/jargon/html/entry/cargo-cult-programming.html
> Here's a complete replacement for the above:
[snip]
> print <<EOHTML;
> <html>
> <head><title>Sample Response Page</title></head>
> <body>
> Thank you: $first $last
> </body>
> </html>
> EOHTML
If the OP wants to try the replacement program, be sure to
un-indent it.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 4470
***************************************