[25807] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8046 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 3 11:05:33 2005

Date: Tue, 3 May 2005 08:05:10 -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, 3 May 2005     Volume: 10 Number: 8046

Today's topics:
    Re: Can't install Oracle::Loader module <sisyphus1@nomail.afraid.org>
    Re: loading values from txt to database <hackeras@gmail.com>
    Re: LWP and getting secured documents <tadmc@augustmail.com>
    Re: Somethign about hashes <jurgenex@hotmail.com>
    Re: Somethign about hashes <hackeras@gmail.com>
    Re: Somethign about hashes <jurgenex@hotmail.com>
    Re: Somethign about hashes <hackeras@gmail.com>
    Re: start_table problem <matternc@comcast.net>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <hackeras@gmail.com>
    Re: start_table problem <matternc@comcast.net>
    Re: start_table problem <mark.clementsREMOVETHIS@wanadoo.fr>
    Re: start_table problem <noreply@gunnar.cc>
    Re: start_table problem <tadmc@augustmail.com>
    Re: start_table problem <tadmc@augustmail.com>
    Re: start_table problem <tadmc@augustmail.com>
    Re: start_table problem <jurgenex@hotmail.com>
    Re: why explicit package name required? <geoff.cox@notquitecorrectfreeuk.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 3 May 2005 21:05:56 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Can't install Oracle::Loader module
Message-Id: <42775af3$0$4656$afc38c87@news.optusnet.com.au>


"Edward" <egoduk@NOSPAM_hotmail.com> wrote in message
news:42761d87$0$83063$ed2619ec@ptn-nntp-reader01.plus.net...
> Running 'perl Makefile.pl' reports a file (Loader.t) is missing from the
> distribution. This file is where it's supposed to be.
>
> Any ideas how I would fix this?

Shouldn't matter - at least in relation to the successful building of the
module. All that matters is that the file is found (and run) when you run
'make test'.
The warning might disappear if, in MANIFEST, you change:

 ./t/Loader.t

to:

t/Loader.t

Cheers,
Rob




------------------------------

Date: Tue, 03 May 2005 17:20:55 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: loading values from txt to database
Message-Id: <d581c6$56q$1@nic.grnet.gr>

This is what i manges to do to load the the already existing gamename 
and descriptions from the .txt to the database and update the if the 
game is already there or inserting a new database entry if new game is 
added to descriptions.txt

But still it isnt working. I cant see why.


my @row;
my $select = $dbh->prepare( "SELECT * FROM games WHERE gamename=?" );
my $insert = $dbh->prepare( "INSERT INTO games (gamename, gamedesc, 
gamecounter) VALUES (?, ?, ?)" );
my $update = $dbh->prepare( "UPDATE games SET gamedesc=? where 
gamename=?" );

open (FILE, "<../data/games/descriptions.txt") or die $!;
     while (<FILE>) {
         chomp;

         my ($gamename, $gamedesc) = split /\t/;
         $select->execute( $gamename );

         my $count;
         while( my $row = $select->fetchrow_arrayref ) {
             $count = $row->[0];
         }

         if( $count == 0 ) {                                    #a new game
             $insert->execute( $gamename, $gamedesc, 0 );
         }
         else {
             $update->execute( $gamedesc, $gamename );
         }
     }
close (FILE);



-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Tue, 3 May 2005 08:42:11 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: LWP and getting secured documents
Message-Id: <slrnd7evtj.2qt.tadmc@magna.augustmail.com>

justme <eight02645999@yahoo.com> wrote:

> i need to connect to a secured server to get a security log file. This
> log file
> can only be accessed using the software client (GUI) that comes with
> the distribution CD. And everytime i used the software to get the
> file, it requires me to use a username and password. 


Sounds sensible.


> After that, the
> first page is http://securedserver:1010/logs/.  


How did you determine that?

"securedserver" does not look like a good domain to me. Is the SW
mucking about with your local DNS?


> So i gathered a little
> code in perl to do that automatically. 


You want to embed security-related passwords in a clear text file?

Gulp.


> It seems that the software does
> not allow ppl to use scripts to get its files, not even ftp or SSH.


Security programs should make it hard to get log files, the bad
guys will try to get them.


> Any other suggestions?


Ask the vendor how to accomplish what you want.

Can you configure a proxy for the supplied SW?

If so, try hooking it up to wsp.pl (Web Scraping Proxy) to log
what traffic the SW generates.


> the output is:


[snip output]


Looks like your DNS _does_ know how to resolve "http://securedserver",
else you wouldn't have gotten that output.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 03 May 2005 14:32:39 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Somethign about hashes
Message-Id: <bYLde.351$8e4.338@trnddc09>

Nikos wrote:
> Maybe you can help me with this too:
>
> print span( {class=>'tip'},  "Some Greek Text!" );
[...]
> What am i doing wrong?

Well, did you actually read the error message? You didn't define the 
subroutine span():

    Undefined subroutine &main::span called at t.pl line 1.

jue 




------------------------------

Date: Tue, 03 May 2005 17:36:35 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: Somethign about hashes
Message-Id: <d5829g$62t$1@nic.grnet.gr>

"J�����������������������������������" wrote:
> Nikos wrote:
> 
>>Maybe you can help me with this too:
>>
>>print span( {class=>'tip'},  "Some Greek Text!" );
> 
> [...]
> 
>>What am i doing wrong?
> 
> 
> Well, did you actually read the error message? You didn't define the 
> subroutine span():
> 
>     Undefined subroutine &main::span called at t.pl line 1.

I dont understand well the erro messages.
Span has to be defined in use statements as well?
I though it was like font.


-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Tue, 03 May 2005 14:44:59 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Somethign about hashes
Message-Id: <L7Mde.353$8e4.199@trnddc09>

Nikos wrote:
> "J???????????????????????????????????" wrote:
>> Nikos wrote:
>>
>>> Maybe you can help me with this too:
>>>
>>> print span( {class=>'tip'},  "Some Greek Text!" );
>> [...]
>>
>>> What am i doing wrong?
>>
>> Well, did you actually read the error message? You didn't define the
>> subroutine span():
>>
>>     Undefined subroutine &main::span called at t.pl line 1.
>
> I dont understand well the erro messages.
> Span has to be defined in use statements as well?
> I though it was like font.

The Perl programming language has neither a function span() nor font().
Therefore you have to define them yourself if you want to use those 
functions.

Details see "perldoc perlsub"

jue 




------------------------------

Date: Tue, 03 May 2005 17:55:47 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: Somethign about hashes
Message-Id: <d583dh$70j$1@nic.grnet.gr>

"J�����������������������������������" wrote:
> Nikos wrote:
> 
>>"J???????????????????????????????????" wrote:
>>
>>>Nikos wrote:
>>>
>>>
>>>>Maybe you can help me with this too:
>>>>
>>>>print span( {class=>'tip'},  "Some Greek Text!" );
>>>
>>>[...]
>>>
>>>
>>>>What am i doing wrong?
>>>
>>>Well, did you actually read the error message? You didn't define the
>>>subroutine span():
>>>
>>>    Undefined subroutine &main::span called at t.pl line 1.
>>
>>I dont understand well the erro messages.
>>Span has to be defined in use statements as well?
>>I though it was like font.
> 
> 
> The Perl programming language has neither a function span() nor font().
> Therefore you have to define them yourself if you want to use those 
> functions.
> 
> Details see "perldoc perlsub"

With fonts i didnt defined anything.
i just used print font(blabla...) and it worked.
Now span works the same without any extra definitions.


-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Tue, 03 May 2005 07:10:05 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: start_table problem
Message-Id: <nqadnWUCo-yQwerfRVn-ug@comcast.com>

Nikos wrote:

> Chris Mattern wrote:
> 
>> Post a simple and complete program that is the minimum necessary to
>> reproduce the problem.  As you have been asked to do MANY, MANY times.
> 
> That what i did Chris! I posted the 5-6 lines of code containing the
> strt_table that i was having problem with.
> 
> 
No, you didn't.  It was not a complete program.  The use statements are
relevant because they define the subroutines you are attempting to call.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


------------------------------

Date: Tue, 03 May 2005 14:21:54 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d57msg$pfe$1@nic.grnet.gr>

Chris Mattern wrote:
> Nikos wrote:
> 
> 
>>Chris Mattern wrote:
>>
>>
>>>Post a simple and complete program that is the minimum necessary to
>>>reproduce the problem.  As you have been asked to do MANY, MANY times.
>>
>>That what i did Chris! I posted the 5-6 lines of code containing the
>>strt_table that i was having problem with.
>>
>>
> 
> No, you didn't.  It was not a complete program.  The use statements are
> relevant because they define the subroutines you are attempting to call.

If i knew that i would post the use statements as well.

So what can i do to fix it?


-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Tue, 03 May 2005 14:27:25 +0300
From: Nikos <hackeras@gmail.com>
Subject: Re: start_table problem
Message-Id: <d57n6r$q17$1@nic.grnet.gr>

Nikos wrote:
> Why when i run this i get an eroor saying start_table is undef(i dont 
> remmber the error exactly but its something abou the line with start_table
> 
> 
> ====================================================
> print start_form(-action=>'games.pl');
>     print start_table( {class=>'games'} );
>         while( $row = $sth->fetchrow_hashref )
>         {
>             print Tr(
>                      td( {-width=>'20%'},  submit( $row->{gamename} )),
>                      td( {-width=>'75%'},  $row->{gamedesc}         ),
>                      td( {-width=>'5%'},   $row->{gamecounter}      )
>                   );
>         }
>     print end_table;
> print end_form, br;
> 
> ====================================================
> 

it worked!
i just changed print start_table( {class=>'games'} );
with print table( {class=>'games'} ); and it worked!

-- 
"Of course I cant stop you. And that would really bum me out
if that were my job. But my job isnt to stop you, its to
make it as difficult as possible, for as many as possible,
for as long as possible ."


------------------------------

Date: Tue, 03 May 2005 08:23:18 -0400
From: Chris Mattern <matternc@comcast.net>
Subject: Re: start_table problem
Message-Id: <Tp-dnadta7qr8OrfRVn-iw@comcast.com>

Nikos wrote:

> Chris Mattern wrote:
>> Nikos wrote:
>> 
>> 
>>>Chris Mattern wrote:
>>>
>>>
>>>>Post a simple and complete program that is the minimum necessary to
>>>>reproduce the problem.  As you have been asked to do MANY, MANY times.
>>>
>>>That what i did Chris! I posted the 5-6 lines of code containing the
>>>strt_table that i was having problem with.
>>>
>>>
>> 
>> No, you didn't.  It was not a complete program.  The use statements are
>> relevant because they define the subroutines you are attempting to call.
> 
> If i knew that i would post the use statements as well.

So you're using a module with no idea what it does. 
> 
> So what can i do to fix it?
> 
> 
Read the documentation for your CGI module so you know what the hell you're
doing.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


------------------------------

Date: Tue, 03 May 2005 15:36:24 +0200
From: Mark Clements <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: start_table problem
Message-Id: <42777e55$0$817$8fcfb975@news.wanadoo.fr>

Nikos wrote:
> Mark Clements wrote:
> 
>> All of this is documented elsewhere. Nikos: do you really read 
>> *nothing* beyond what is posted here?
> 
> 
> I didnt even read the book i bought Perl- How to Program by Deitel.
You surprise me.

> 
>> You are never going to modify your approach, are you? I may have to 
>> abandon reading this newsgroup: there is little point in killfiling 
>> you because you generate so much traffic (most of it pointing out the 
>> error of your ways to you, *none* of which you listen to) I'll see 
>> your posts anyway.
> 
> 
> No please that wouldnt be fair.
> You will NOT abandon reading this fine ng as well getting helped and 
> help others because of me.
> I'am the one that doesnt read the docs and causing too much traffic 
> because i cant deal with the singlest problem i encounter.
> I cause problem, and i ahve to go, not you.
Don't worry yourself: you've prompted me to change newsreader. I can now 
ignore any thread that you start completely. This will be better for my 
sanity.


> I'am willing to read the docs but *only* that part that it *will* answer 
> my questions, not other general stuff, so the problem will be quickly 
> fixed.
So far, you haven't read the bits of the documentation that you need to 
that people have suggested you read, so I don't really know what to say 
here. Generally, you won't magically know which bits you need to read 
unless you have a good overall understanding. You don't have this, in 
fact, you're unlikely ever to have it.

> 
> Anyway, please do not let those hard endless days that i was asking here 
>  for almost about everything scare you and go away.
> 
> I 'll leave aa=nd maybe once in a while(rarely) i'll ask somethign 
> specific.
Crap. You've promised to make changes before and it has never happened. 
Goodbye.


------------------------------

Date: Tue, 03 May 2005 15:50:16 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: start_table problem
Message-Id: <3dpdscF6rj7tsU1@individual.net>

Mark Clements wrote:
> I may have to abandon reading this newsgroup: there is little point
> in killfiling you because you generate so much traffic

And *that* is not Nikos' fault, is it?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: Tue, 3 May 2005 08:45:14 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: start_table problem
Message-Id: <slrnd7f03a.2qt.tadmc@magna.augustmail.com>

Nikos <hackeras@gmail.com> wrote:
> Chris Mattern wrote:
>> Nikos wrote:
>>>Chris Mattern wrote:
>>>
>>>
>>>>Post a simple and complete program that is the minimum necessary to
                      ^^^^^^^^^^^^^^^^
                      ^^^^^^^^^^^^^^^^
>>>>reproduce the problem.  As you have been asked to do MANY, MANY times.
>>>
>>>That what i did Chris! I posted the 5-6 lines of code containing the
>>>strt_table that i was having problem with.
>>>
>>>
>> 
>> No, you didn't.  It was not a complete program.  The use statements are
>> relevant because they define the subroutines you are attempting to call.
> 
> If i knew that i would post the use statements as well.


If you had bothered to build a small and complete program *that we can run*,
then you *would* have known that.

(that is exactly the reason behind the Guideline's suggestion in the 1st place.)


> So what can i do to fix it?


Post a small and complete program *that we can run* as suggested
in the Posting Guidelines to maximize your chances of getting
a useable answer.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 3 May 2005 08:47:41 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: start_table problem
Message-Id: <slrnd7f07t.2qt.tadmc@magna.augustmail.com>

Nikos <hackeras@gmail.com> wrote:

> I cause problem, and i ahve to go, not you.


Thank you.

When will that be happening?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 3 May 2005 08:55:38 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: start_table problem
Message-Id: <slrnd7f0mq.2qt.tadmc@magna.augustmail.com>

Nikos <hackeras@gmail.com> wrote:


> i really must start to read some docs or else iam 
> gonna ask for everything.


Many many people have said that many many times over the last
few days. You're not a very quick study I'm afraid...


> perldoc -f print
> 
> what does the -f switch stands for? 


The Posting Guidelines cover that.

The Posting Guidelines suggest many ways to increase your
chances of getting a useable answer.

Why do you insist on *minimizing* your chances? It makes no sense!

Do you really want answers or not?

If you really want answers, follow the guidelines.


> Also, i often see perl -e 'something'


"perl" is a different program from "perldoc", so it of course
has different command line switches.

The command lines switches for the "perl" program are documented in:

   perldoc perlrun


> Is this for trying instantly on console one statement and see directly 
> the output without having to create a perl prog to do that?


I dunno, go see what perlrun says it does, then try it out yourself.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 03 May 2005 14:39:32 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: start_table problem
Message-Id: <E2Mde.352$8e4.22@trnddc09>

Nikos wrote:
> Can you beleive that i dont know at all how to use perldoc even how to
> serach the syntax of print?

Guess what, considering your numerous contributions to this NG that fact is 
blatently obvious to anyone!

jue 




------------------------------

Date: Tue, 03 May 2005 10:10:52 GMT
From: Geoff Cox <geoff.cox@notquitecorrectfreeuk.com>
Subject: Re: why explicit package name required?
Message-Id: <dgje711rk7p0mu3uicqb7nq6v5h2jga38p@4ax.com>

On 3 May 2005 08:23:37 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
Siegel) wrote:

>perldoc -f my.  Also see "strict vars" in perldoc strict.

will do - thanks

Geoff


>
>Anno



------------------------------

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 8046
***************************************


home help back first fref pref prev next nref lref last post