Re: Problem running the socket programming

2003-06-02 Thread James Edward Gray II
Since I'm coming into this conversation late, can you tell me what's wrong with the program? What kind of errors are you getting? James On Sunday, June 1, 2003, at 08:09 PM, anil adenan wrote: In that case, the path is not the cause on why my socket program wont work. I've change the first li

Re: converting arrayname to string or vice-versa

2003-06-02 Thread James Edward Gray II
On Monday, June 2, 2003, at 06:53 AM, zentara wrote: Say I have an array like: @somename = (1,2,3,4,5); and I want to write that array to a file, but I want the file named automatically by just dropping the @ off of the @somename. How would you go about doing it? Well, if your still inside your

RE: converting arrayname to string or vice-versa

2003-06-02 Thread Bob Showalter
zentara wrote: > Hi, > This one is puzzling me. > I know it's in the faq, to not use variables for variable naming, > but I find it odd that I can't get a "stringified" form of a variable > name, maybe from the symbol table? Or from the B line of modules? > > Say I have an array like: > > @somena

Re: Reference to an array from within a hash....how to de-ref.

2003-06-02 Thread Rob Anderson
> the life of me, I cannot get there. I have tried... > >foreach $key ( keys %$hostsref ) { >print ("Inserting $key into Database\n"); Try this, the prints are to make it easier to understand, hopefully :-) # print '$hostsref = ' . $hostsref . "\n";# your or

RE: DBI and Unique Keys

2003-06-02 Thread Bob Showalter
Mark Martin wrote: > Hi, > I have an Oracle table with a Unique Key which is generated by a > trigger : > > CREATE TRIGGER MYTRIGGER > before insert on MYTABLE > for each row > begin > select MYSEQUENCE.nextval into :new.MYCOLUMNAME from dual; end; > And this works fine on normal insert > > When

Re: make errors with RPM::Database on redhat 9.0

2003-06-02 Thread Pete Emerson
R>I am not able to install RPM::Database from Perl-RPM-0.40.tar.gz R> gives a weird lot of make errors like this. R> Makefile:93: *** missing separator. Stop. R> Has anyone faced ( and solved this problem before ) I had this problem as well. Unfortunately, I can't find my source to back up

Re: converting arrayname to string or vice-versa

2003-06-02 Thread Tassilo von Parseval
On Mon, Jun 02, 2003 at 07:53:06AM -0400 zentara wrote: > This one is puzzling me. > I know it's in the faq, to not use variables for variable naming, > but I find it odd that I can't get a "stringified" form of a variable > name, maybe from the symbol table? Or from the B line of modules? > > S

make errors with RPM::Database on redhat 9.0

2003-06-02 Thread Ramprasad
Hi I was just trying to upgrade my server from redhat 7.2 to redhat 9.0 and now am finding myself in a soup I am not able to install RPM::Database from Perl-RPM-0.40.tar.gz gives a weird lot of make errors like this. Makefile:93: *** missing separator. Stop. I tried to open the Makefile

converting arrayname to string or vice-versa

2003-06-02 Thread zentara
Hi, This one is puzzling me. I know it's in the faq, to not use variables for variable naming, but I find it odd that I can't get a "stringified" form of a variable name, maybe from the symbol table? Or from the B line of modules? Say I have an array like: @somename = (1,2,3,4,5); and I want to

OT: referencing, derefrencing, and interpolation WAS: using a CONSTANT as a pathname

2003-06-02 Thread Todd W
"Tassilo Von Parseval" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, Jun 01, 2003 at 08:36:34PM -0400 Todd Wade wrote: > > > "Tassilo Von Parseval" <[EMAIL PROTECTED]> wrote in > > message news:[EMAIL PROTECTED] > > > On Sun, Jun 01, 2003 at 11:22:32AM +0200 Kevin Pfeiffer

RE: sendmail syntax error

2003-06-02 Thread Geer, David van der
> [EMAIL PROTECTED] ./summer.pl > Bareword found where operator expected at ./summer.pl line 78, near "print > SENDMAIL "TO" > (Might be a runaway multi-line "" string starting on line 77) >(Do you need to predeclare print?) > syntax error at ./summer.pl line 78, near "print SENDMAIL "TO"

Re: Passing arrays/associative arrays into subroutines ... how?

2003-06-02 Thread Tassilo von Parseval
On Sun, Jun 01, 2003 at 04:20:28PM -0500 James Edward Gray II wrote: > On Sunday, June 1, 2003, at 04:12 PM, Ken Tozier wrote: > > >No luck. Dropping the \ in 'my $description = > >DescribeCritter(\%wombatStats);' didn't fix the problem. > > You're right. I was dumb. Let me try again... > >

Re: using a CONSTANT as a pathname

2003-06-02 Thread Tassilo von Parseval
On Sun, Jun 01, 2003 at 08:36:34PM -0400 Todd Wade wrote: > "Tassilo Von Parseval" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] > > On Sun, Jun 01, 2003 at 11:22:32AM +0200 Kevin Pfeiffer wrote: > > > > > > > open DATA, ">@{[ CFG ]}" or die ...; > > > > The part between @{[ ]

Re: Problem running the socket programming

2003-06-02 Thread anil adenan
In that case, the path is not the cause on why my socket program wont work. I've change the first line (the path) to the perl interpreter but it still wont work. Below is the snippet of the code, in case I am missing anything. --code-- #!/usr/contrib/bin/perl -w require 5.002; use strict; use So

got stuck...........help asap

2003-06-02 Thread Vema, Venkata
Hi Gurus i got stuck up on continuing further,i have a pgm called "xapipgm" running when it stopped it has to automatically executed by calling #AHDXPAIINIT# can any one help on this wud be appreicated ur reply asap. regards venkat #AHDXAPICHECK# xapipgm=srvtst26.pl pgrep -f $xapip

Re: using a CONSTANT as a pathname

2003-06-02 Thread Todd Wade
"Tassilo Von Parseval" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, Jun 01, 2003 at 11:22:32AM +0200 Kevin Pfeiffer wrote: > > > open DATA, ">@{[ CFG ]}" or die ...; > > The part between @{[ ]} is arbitry Perl-code that is executed in list > context and the last expre

Re: PCRE Range Matching

2003-06-02 Thread WC -Sx- Jones
[PMFJI] Following up to my own post - On Sunday, June 1, 2003, at 07:58 PM, WC -Sx- Jones wrote: /(37.3,200)/; # matches any number x, 37.3 < x < 200 /((37.3,200))/; # matches any number x, 37.3 < x < 200 and saves it ... But I cannot seem to get the simple test case working

RE: beginners Digest 30 May 2003 07:59:34 -0000 Issue 1599

2003-06-02 Thread \(William\) Wenjie Wang
Using perl2exe >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] >Sent: Friday, 30 May 2003 6:00 PM >To: [EMAIL PROTECTED] >Subject: beginners Digest 30 May 2003 07:59:34 - Issue 1599 > > > >beginners Digest 30 May 2003 07:59:34 - Issue 1599 > >Topics (message

PCRE Range Matching

2003-06-02 Thread WC -Sx- Jones
I am writing a complex PCRE for my Postfix mail server and I would like to use something along the lines of: /(37.3,200)/; # matches any number x, 37.3 < x < 200 /((37.3,200))/; # matches any number x, 37.3 < x < 200 and saves it /([37,))/; # matches and saves any

RE: Reference to an array from within a hash....how to de-ref.

2003-06-02 Thread Charles K. Clarkson
Hamish Whittal <[EMAIL PROTECTED]> wrote: : Now I want to get at the arrays inside the IP address : keysand for the life of me, I cannot get there. I : have tried... : : foreach $key ( keys %$hostsref ) { : print ("Inserting $key into Database\n"); : @arr = @{ $hostsref{$key} };

RE: Passing arrays/associative arrays into subroutines ... how?

2003-06-02 Thread Charles K. Clarkson
Ken Tozier <[EMAIL PROTECTED]> wrote: : : my %wombatStats = GetWombat(); : my $description = DescribeCritter(\% wombatStats); my $description = DescribeCritter(\%wombatStats); I didn't try it but I don't think the space after '%' is a good idea. It is a good idea to get in the habit of passin

Reference to an array from within a hash....how to de-ref.

2003-06-02 Thread Hamish Whittal
Hi People, Anyone can help me out. I have a datastructure that looks like this: $hostsref = { '10.15.110.1' => [ '10_15_110_1', 'public', '.1.3.6.1.4.1.9.1.209', '2

Re: Passing arrays/associative arrays into subroutines ... how?

2003-06-02 Thread James Edward Gray II
On Sunday, June 1, 2003, at 04:12 PM, Ken Tozier wrote: No luck. Dropping the \ in 'my $description = DescribeCritter(\%wombatStats);' didn't fix the problem. You're right. I was dumb. Let me try again... my $description = DescribeCritter(\% wombatStats); Drop the backslash and space here, as

Re: Passing arrays/associative arrays into subroutines ... how?

2003-06-02 Thread Ken Tozier
On Sunday, June 1, 2003, at 04:35 PM, James Edward Gray II wrote: On Sunday, June 1, 2003, at 03:27 PM, Ken Tozier wrote: my $description = DescribeCritter(\%wombatStats); This is passing a hash to a hash. No reference required for that. Just drop the \. I also believe you have a space after

Re: Passing arrays/associative arrays into subroutines ... how?

2003-06-02 Thread James Edward Gray II
On Sunday, June 1, 2003, at 03:27 PM, Ken Tozier wrote: my $description = DescribeCritter(\% wombatStats); This is passing a hash to a hash. No reference required for that. Just drop the \. I also believe you have a space after the % that shouldn't be there. Hope that helps. James -- To u

Passing arrays/associative arrays into subroutines ... how?

2003-06-02 Thread Ken Tozier
Here's the flip side of yesterday's array question. Now that I know how to pass associative arrays out of a routine, I'm having trouble trying to use them in other routines. The best I can figure from reading is that I need to pass them by reference, but in practice, the terminal always fills u

Re: open(IN,) flock?

2003-06-02 Thread Tassilo von Parseval
On Sun, Jun 01, 2003 at 09:35:56AM -0700 Bob's Demise wrote: > I've written a Perl/CGI that allows a user to search > for a string in a specified file. I've yet to make > this little program widely available - and currently > with one or two users - it's quite speedy. I > anticipate no more than

Re: open(IN,) flock?

2003-06-02 Thread Rob Dixon
Rob Dixon wrote: > Bob'S Demise wrote: > > Hello > > > > I've written a Perl/CGI that allows a user to search > > for a string in a specified file. I've yet to make > > this little program widely available - and currently > > with one or two users - it's quite speedy. I > > anticipate no more tha

Re: open(IN,) flock?

2003-06-02 Thread Rob Dixon
Bob'S Demise wrote: > Hello > > I've written a Perl/CGI that allows a user to search > for a string in a specified file. I've yet to make > this little program widely available - and currently > with one or two users - it's quite speedy. I > anticipate no more than 20 users attempting to access >

open(IN,) flock?

2003-06-02 Thread Bob's Demise
Hello I've written a Perl/CGI that allows a user to search for a string in a specified file. I've yet to make this little program widely available - and currently with one or two users - it's quite speedy. I anticipate no more than 20 users attempting to access the same file at the same time -

Re: count of words (fields) after "split"

2003-06-02 Thread WC -Sx- Jones
On Saturday, May 31, 2003, at 03:28 PM, John W. Krahn wrote: Richard müller wrote: Hi, Hello, I'm a very newbie with perl. I have a text file and want to read it line by line and split it into words: It depends on how you define "words". Allow me to drag this old code out of the ether realm:

Re: Returning arrays from subroutines... how?

2003-06-02 Thread Ken Tozier
Thanks for answering David, Jeff and Beau. My script works like a charm now. Ken -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: using a CONSTANT as a pathname

2003-06-02 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Wc -Sx- Jones wrote: > > On Sunday, June 1, 2003, at 05:22 AM, Kevin Pfeiffer wrote: > >> use constant CFG => qq|$ENV{'HOME'}/.get_quiz|; > > > Well, you could convert it back to a variable prior to use: [...] I would have been happy to have used a variable i

Re: Wanted: Help with Function Arguments

2003-06-02 Thread Rob Dixon
Richard Heintze wrote: > James, > The problem occurs when $q->param('next') returns a > null of sorts because there is no such parameter in > the URL. If there is no such parameter then 'param' will return either 'undef' or an empty list according to context. > Apparently, this does not get passe