Subroutine redefined at ***.pm error

2005-01-31 Thread Anish Kumar K.
Hi I am using a perl module in which I have used some routines. and when I complile the script with perl -w .pm I get these errors( like routine redefined) Subroutine ExpiryMessage redefined at **.pm line 1200. Subroutine InstructorExpiryMessage redefined at ***.pm line 2454. Subroutine Rev

dbi:odbc: don´t get all rows from database

2005-01-31 Thread Atterbigler Josef
Hi I don´t get all rows from database with my perlscript, following error displayed: Use of uninitialized value in concatenation (.) The same query statement on mssql server I get more rows, whats wrong? my $statement2 = "select Doctyp, Count (*) as count_doctyp from tdoc_kd where archdate

Problem in reading cookies

2005-01-31 Thread Mallik
Hi All, I have an perl script that reads cookies. In one system it is able to read the cookies properly. But the same is not working in another system. Browsers and their versions are same in both systems. I even set the browser properties same in both the systems. Then I printed the environment

how to use hash as parameter

2005-01-31 Thread Hou Feng.Leo
Dear all, I want to pass a hash to a function which prints out hash's content. My code does not work. Can anyone tell me what is wrong with it? Thanks a lot #!/usr/bin/perl my %hs; $hs{"one"} = 1; $hs{"two"} = 2; sub pr { my $ref = $_; foreach $key (sort keys %ref) { print "$key = $r

appendix -> odbc: don´t get all rows from database

2005-01-31 Thread Atterbigler Josef
Hello again, A little appendix for understanding, I mean not the complete rows of database but rather all counted rows which I should get from the statement, in the moment I still got only one row of 8 rows. Sorry for wrong formulation! regards Joe Hi I don´t get all rows from database wi

Re: how to use hash as parameter

2005-01-31 Thread Ing. Branislav Gerzo
Hou Feng.Leo [HFL], on Monday, January 31, 2005 at 11:00 (+) contributed this to our collective wisdom: HFL> I want to pass a hash to a function which prints out hash's content. My HFL> code does not work. Can anyone tell me what is wrong with it? Thanks a lot nearly everything you needs for

Re: how to use hash as parameter

2005-01-31 Thread Ankur Gupta
#!/usr/bin/perl my %hs; $hs{"one"} = 1; $hs{"two"} = 2; sub pr { my $ref = $_; foreach $key (sort keys %$ref) { print "$key = ${$ref{$key}}"; } } pr(\%hs); This should work.. -- Ankur Hou Feng.Leo wrote: > Dear all, > I want to pass a hash to a function which prints out hash's content. > My

Dynamic Loading

2005-01-31 Thread ds10025
How do you check Perl 5.8.1 is configured for Dynamic Loading? Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: dbi:odbc: don´t get all rows from database

2005-01-31 Thread Balakrishna Balareddy
Hi, Use while loop after execute i.e $sth->execute(); while(@doctyp = $sth->fetchrow_array) { ## process ur @doctyp array here. } Thanks & Regards Bala On Mon, 31 Jan 2005 10:22:48 +0100, Atterbigler Josef <[EMAIL PROTECTED]> wrote: > Hi > > I don´t get all rows from database with

win32 service manipulation

2005-01-31 Thread forums
Greetings list I have googled around and also looked at CPAN, but with no luck. What I am trying to do is to take a service in Windows that has it's start-up set to Disabled and set it to manual and vice versa. I also need to be able to start and stop service (I guess this one is easily doable with

flush function

2005-01-31 Thread Urs Wagner
Hello I have a problem on WinXP. In perl I want to read the tail of a file. The file is written with another windows program. If I am using a sleep(5) before of the read command I get the new tail content. It seems the program has longer to write it or it is buffered. Is there a command in perl

Re: LWP: Accessing https URL from http proxy unimplemented?

2005-01-31 Thread David Garamond
Ing. Branislav Gerzo wrote: DG> I do have all three modules (Crypt::SSLeay, Net::SSLeay, DG> IO::Socket::Perl) installed, but still can't get https:// through an DG> http proxy. LWP::UserAgent would immediately return a response object DG> with code 501. I can access https:// URLs directly (without

Re: flush function

2005-01-31 Thread Ankur Gupta
Urs Wagner wrote: Hello I have a problem on WinXP. In perl I want to read the tail of a file. The file is written with another windows program. If I am using a sleep(5) before of the read command I get the new tail content. It seems the program has longer to write it or it is buffered. Is there

odbc: don´t get all rows from database

2005-01-31 Thread Atterbigler Josef
Hi, Many thanks all, for your early reply, it works now fine. regards Joe -Ursprüngliche Nachricht- Von: Atterbigler Josef [mailto:[EMAIL PROTECTED] Gesendet: Montag, 31. Januar 2005 10:23 An: beginners@perl.org Betreff: dbi:odbc: don´t get all rows from database Hi I don´t get all

Win32::shell

2005-01-31 Thread DiGregorio, Dave
I can not seam to find the Win32::shell module any where for version 5.8.x. If I install 5.6.x I can install this module just not on 5.8.x. Could someone shed some light on this subject. Am I stuck using 5.6.x? for this reason? Thanks David R. DiGregorio

File is not getting created in perl CGI

2005-01-31 Thread Anish Kumar K.
File is not getting created in perl CGI mode... It is surprising that the file is not created in the CGI I tried this from the command line it is getting created there... I am not able to debug also this issue. Please help in proceeding this #!/usr/bin/perl use CGI; my $cgi=new CGI; pr

Re: flush function

2005-01-31 Thread Ing. Branislav Gerzo
Ankur Gupta [AG], on Monday, January 31, 2005 at 19:30 (+0530) wrote these comments: AG> to flush the contents, set at the top of your perl program. AG> $| = 1; ^ this will don't cache STDOUT, if you want flush to file, just do it like this: open FILE, ">file.txt" || die "Can't open... $!\n"; se

RE: File is not getting created in perl CGI

2005-01-31 Thread Bob Showalter
Anish Kumar K. wrote: > File is not getting created in perl CGI mode... > > It is surprising that the file is not created in the CGI > > I tried this from the command line it is getting created there... Most likely explanation is that the web server user does not have write privilege in the

Re: File is not getting created in perl CGI

2005-01-31 Thread Ing. Branislav Gerzo
Anish Kumar K. [AKK], on Monday, January 31, 2005 at 19:41 (+0530) contributed this to our collective wisdom: AKK> #!/usr/bin/perl use strict; use warnnings; #always put this at the top! AKK> use CGI; AKK> open (TXT, ">tmp.txt") || die "Can't create $file"; what is in $file ? :) AKK> prin

RE: File is not getting created in perl CGI

2005-01-31 Thread Manav Mathur
use CGI::Carp qw(fatalsToBrowser) ; will redirect the error messages to the browser(if you are not checking the webserver logs, please do so immediately). Manav -Original Message- From: Anish Kumar K. [mailto:[EMAIL PROTECTED] Sent: Monday, January 31, 2005 7:41 PM To: beginners perl Su

Re: LWP: Accessing https URL from http proxy unimplemented?

2005-01-31 Thread Ing. Branislav Gerzo
David Garamond [DG], on Monday, January 31, 2005 at 20:58 (+0700) wrote about: >> $ua->proxy(['http', 'https'] => "http://213.46.246.134:80";); DG> I have done the above and the proxy (squid) does support SSL (using DG> CONNECT method), I use it everyday. LWP returns 501 without hitting the DG> p

RE: flush function

2005-01-31 Thread Thomas Bätzler
Urs Wagner <[EMAIL PROTECTED]> asked: > I have a problem on WinXP. In perl I want to read the tail of a file. > The file is written with another windows program. If I am > using a sleep(5) before of the read command I get the new > tail content. It seems the program has longer to write it or >

Re: win32 service manipulation

2005-01-31 Thread Jenda Krynicky
From: <[EMAIL PROTECTED]> > Greetings list > I have googled around and also looked at CPAN, but with no luck. What > I am trying to do is to take a service in Windows that has it's > start-up set to Disabled and set it to manual and vice versa. I also > need to be able to start and stop service (I

Re: Dynamic Loading

2005-01-31 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: How do you check Perl 5.8.1 is configured for Dynamic Loading? Dan perl -V Helps? http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

perl.beginners Weekly list FAQ posting

2005-01-31 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

Re: RE: flush function

2005-01-31 Thread mgoland
- Original Message - From: Thomas Bätzler <[EMAIL PROTECTED]> Date: Monday, January 31, 2005 9:07 am Subject: RE: flush function > Urs Wagner <[EMAIL PROTECTED]> asked: > > I have a problem on WinXP. In perl I want to read the tail of a > file. > > The file is written with another win

Hash Getting Doubled?

2005-01-31 Thread Graeme St. Clair
Combo ActiveState Perl 5.6.1 635 and Apache 1.0.xx from www.perl.apache.org . The following code goes round the foreach twice as often as I think it should. (I realise the code is probably not particularly stylish, but I'd prefer to leave that alone for the moment.)

Re: Hash Getting Doubled?

2005-01-31 Thread Lawrence Statton
> > What is going on that I haven't understood? > > Rgds, GStC. Your entire problem is : foreach $capval ( sort bynumber %capdef ) { Perhaps you want to sort by the KEYS of %capdef foreach $capval ( sort keys %capdef ) { } -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Re: Hash Getting Doubled?

2005-01-31 Thread Jay
On Mon, 31 Jan 2005 13:40:01 -0800, Graeme St. Clair <[EMAIL PROTECTED]> wrote: > Combo ActiveState Perl 5.6.1 635 and Apache 1.0.xx from www.perl.apache.org > . > > The following code goes round the foreach twice as often as I think it > should. (I realise the code i

RE: Hash Getting Doubled?

2005-01-31 Thread Graeme St. Clair
That was it all right. Thank you. And this code's been in production for years before I got it... Now, purely for information, what actually was happening in the original code? Rgds, GStC. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 31, 2

Blocking Signals

2005-01-31 Thread Jeff Eggen
Hi all, I have been attempting some signal blocking, as done in the Cookbook, second edition, recipe 16.20: ### Begin code use POSIX qw(:signal_h); $SIG{INT} = $SIG{TERM} = sub { exit 0; } while ( 1 ) { my $sigset = POSIX::SigSet->new(SIGINT, SIGTERM); my $old_sigset = PO

RE: Hash Getting Doubled?

2005-01-31 Thread Graeme St. Clair
Lawrence's emendation stopped the extra executions, but Jay's also preserved the original intent, which was to get the hash sorted according to $capval being purely numeric. Thanks to both, rgds, GStC. [cut] > my $counter = 0; > foreach $capval ( sort bynumber %capdef ) { > $counter++; # deb

Safety of storing pricing information in a CGI::Session

2005-01-31 Thread Michael Kraus
G'day all... I'm currently using CGI::Session as part of an online ordering system. I've been passing database primary keys back and forth between the client and server, with all values double checked upon being received at the server. The only problem is that I need to present the total price t

RE: Subroutine redefined at ***.pm error

2005-01-31 Thread Michael Kraus
Hi Anish, It'd appear that you've written each of the functions ExpiryMessage, InstructorExpiryMessage and ReviewerExpiryMessage twice. Check that you've not duplicated your work and confused the parser. Regards, Michael S. E. Kraus B. Info. Tech. (CQU), Dip. Business (Computing) Software Dev