Re: Anyone good at Java ?

2002-05-01 Thread Jonathan E. Paton
> If anyone is good in Java or can tell me where I > can get help find for the following it will be > much appreciated. We are the Perl beginners list, not the Java list. > I'm not entirely sure where I start. > ... James, I'm trying hard to stick to a small flame for what deserves a massive fl

Re: split array

2002-05-01 Thread jeff dowd
I like Rons method best, except you could use this instead ov array slot values, which I am not sure will work... while ( my @data= $cursor->fetchrow_hashref ) { $idnum = $data->{'idnum'}; $username = $data-.{'username'}; $email = $data->{'email'}; $code = $data->{'c

Anyone good at Java ?

2002-05-01 Thread james poni
Hello, If anyone is good in java or can tell me where i can get help find for the following it will be much appreciated. Ive got 2 files file1.txt,file2.txt. EG: file1.txt AD ABCD <=this means add numbers from line ABCD in file2.txt AV <=this means average numbers from line with in fil

Re: string manipulation

2002-05-01 Thread John W. Krahn
Jaimee Spencer wrote: > > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > > > > Either of these should work: > > > > (my $projectId) = $projectDocDir =~ m!.*/(\w+)/!; > > > > # or > > > > my $projectId = (split /\//, $projectDocDir)[-2]; > >I know I am missing something basic here also,

Re: Email validation syntax

2002-05-01 Thread Randal L. Schwartz
> "Shane" == Shane McElwee <[EMAIL PROTECTED]> writes: Shane> Below I've a regular expression that checks the syntax of an email address. Shane> The problem I'm having is with the underscore "_" . I've tried some Shane> different forms of syntax but I know its something simple I'm missing. I

RE: string manipulation

2002-05-01 Thread Jaimee Spencer
Hello John, I know I am missing something basic here also, but tell me in the example (my $projectId) = $projectDocDir =~ m!.*/(\w+)/!; why isn't the /1_0001.doc being printed as well? Open my Eyes! Regards, Jaimee -Original Message- From: John W. Krahn [mailto:[EMAIL PR

Re: dynamic variable declaration?

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 04:22 , Brett W. McCoy wrote: > On 1 May 2002, rory oconnor wrote: > >> If I were to hard-code these declarations, I would have about 40 lines >> that look like: >> >> $order_id = $session->get_query_value('order_id'); >> $customer_id = $session->get_query_value('or

Re: string manipulation

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 04:18 , John W. Krahn wrote: > Garrett Esperum wrote: [..] >> >> /export/home/user/www/doc-root/dir/projects/19463/1_0001.doc >> >> $projectId = substr($projectDocDir, length($dir), index($projectDocDir, >> "/", >> length($dir))); you might want to perldoc File::B

RE: string manipulation

2002-05-01 Thread Jaimee Spencer
Hello Chas, I know I am missing something basic, but tell me in your second example why isn't the /1_0001.doc being printed as well? Regards, Jaimee -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 4:37 PM To: garrett esperum Cc: [EMAIL

Re: checking if domain or IP address

2002-05-01 Thread Shaun Fryer
> I have a small perl script which checks to see if input is a > hostname or an IP address before writing it to a file. > > I was just checking to see if the first char was a number or a > digit but there are some cases where a hostname can start with a > number. (like 3.14159.com for e

Re: split array

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 02:47 , Greg D. wrote: > while(my @data = $sth->fetchrow_array){ > print "@data\n"; > > right now its prints out for example: > > 1 greg [EMAIL PROTECTED] 1234 2 john [EMAIL PROTECTED] 4r434 and so on > > i want it so it prints out.. > > 1 greg [EMAIL PR

Re: string manipulation

2002-05-01 Thread Chas Owens
On Wed, 2002-05-01 at 18:52, garrett esperum wrote: > Hi all, > > I am using Solaris, Perl 5. > > I am having some problems manipulating strings. > > The string I am manipulating is: > > /export/home/user/www/doc-root/dir/projects/19463/1_0001.doc > > I am trying to take out the "19463" part

Re: split array

2002-05-01 Thread Ron
Oops. As you stated, @row is suppose to be @data. I did assume that the display was in HTML. I guess it's an occupational hazard doing web development. Ron "Chas Owens" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wed, 2002-05-01 at 18:43, Ron wrote: > H

Re: string manipulation

2002-05-01 Thread John W. Krahn
Garrett Esperum wrote: > > Hi all, Hello, > I am using Solaris, Perl 5. > I am having some problems manipulating strings. > The string I am manipulating is: > > /export/home/user/www/doc-root/dir/projects/19463/1_0001.doc > > I am trying to take out the "19463" part from the string and insert

Re: split array

2002-05-01 Thread bob ackerman
On Wednesday, May 1, 2002, at 03:43 PM, Ron wrote: > Hello Greg > > This is a simple method that may work. > > while ( my @data= $cursor->fetchrow_array ) { > $idnum = $row[0]; > $username = $row[1]; > $email = $row[2]; > $code= $row[3]; > > print "$idnum $username $email $code "; > }

Re: split array

2002-05-01 Thread Chas Owens
On Wed, 2002-05-01 at 18:43, Ron wrote: > Hello Greg > > This is a simple method that may work. > > while ( my @data= $cursor->fetchrow_array ) { > $idnum = $row[0]; > $username = $row[1]; > $email = $row[2]; > $code= $row[3]; > > print "$idnum $username $email $code "; > } > > "Greg

string manipulation

2002-05-01 Thread garrett esperum
Hi all, I am using Solaris, Perl 5. I am having some problems manipulating strings. The string I am manipulating is: /export/home/user/www/doc-root/dir/projects/19463/1_0001.doc I am trying to take out the "19463" part from the string and insert it into a variable. Example of my code to do

Re: split array

2002-05-01 Thread Ron
Hello Greg This is a simple method that may work. while ( my @data= $cursor->fetchrow_array ) { $idnum = $row[0]; $username = $row[1]; $email = $row[2]; $code= $row[3]; print "$idnum $username $email $code "; } "Greg D ." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[E

Re: split array

2002-05-01 Thread Chas Owens
On Wed, 2002-05-01 at 17:47, Greg D. wrote: > Hi, > > Is there any way i can split an array that contains information that i got > from the mysql database? > > here's the code: > > while(my @data = $sth->fetchrow_array){ > print "@data\n"; > > right now its prints out for example: >

Re: dynamic variable declaration?

2002-05-01 Thread Brett W. McCoy
On 1 May 2002, rory oconnor wrote: > If I were to hard-code these declarations, I would have about 40 lines > that look like: > > $order_id = $session->get_query_value('order_id'); > $customer_id = $session->get_query_value('customer_id'); > $bill_prefix = $session->get_query_value('bill_prefix'

RE: dynamic variable declaration?

2002-05-01 Thread Timothy Johnson
Before everybody starts with the screaming, wailing, and gnashing of teeth, I would suggest that this is not the best way to go about doing this. I think everybody tries it at one point in their coding lives, but it will lead you down the path to illegible code. Check out 'perldoc perllol' for

Re: split array

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 03:04 , bob ackerman wrote: > On Wednesday, May 1, 2002, at 02:55 PM, drieux wrote: >> On Wednesday, May 1, 2002, at 02:47 , Greg D. wrote: >>> here's the code: >>> >>> while(my @data = $sth->fetchrow_array){ >>> print "@data\n"; >> >> what does >> >>

dynamic variable declaration?

2002-05-01 Thread rory oconnor
I'm trying to do something that i'm not sure is even possible. I want to cycle thru an array of MySQL fieldnames and dynamically declare variables based on those fieldnames. I can create the array of fieldnames no problem, by just using "describe" with DBI. But I can't figure out the declarati

Re: Email validation syntax

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 12:43 , McElwee, Shane wrote: > Below I've a regular expression that checks the syntax of an email > address. > The problem I'm having is with the underscore "_" . I've tried some > different forms of syntax but I know its something simple I'm missing. I > think I'

Re: split array

2002-05-01 Thread bob ackerman
On Wednesday, May 1, 2002, at 02:55 PM, drieux wrote: > > On Wednesday, May 1, 2002, at 02:47 , Greg D. wrote: > >> Hi, >> >> Is there any way i can split an array that contains information that i >> got >> from the mysql database? >> >> here's the code: >> >> while(my @data = $sth->fetchrow_a

Re: split array

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 02:47 , Greg D. wrote: > Hi, > > Is there any way i can split an array that contains information that i got > from the mysql database? > > here's the code: > > while(my @data = $sth->fetchrow_array){ > print "@data\n"; what does print "$_\n" forea

split array

2002-05-01 Thread Greg D .
Hi, Is there any way i can split an array that contains information that i got from the mysql database? here's the code: while(my @data = $sth->fetchrow_array){ print "@data\n"; right now its prints out for example: 1 greg [EMAIL PROTECTED] 1234 2 john [EMAIL PROTECTED] 4r434 and s

Re: Email validation syntax

2002-05-01 Thread John W. Krahn
Shane McElwee wrote: > > Below I've a regular expression that checks the syntax of an email address. > The problem I'm having is with the underscore "_". The \w character class includes the underscore character (\w eq [a-zA-Z0-9_]) > I've tried some > different forms of syntax but I know its so

RE: PDK

2002-05-01 Thread Nikola Janceski
I still wonder how I learned perl without syntax highlighting (talking Perl 4)? How did every manage without nedit (nedit.org)? > -Original Message- > From: Timothy Johnson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 01, 2002 4:16 PM > To: 'Ned Cunningham'; [EMAIL PROTECTED] > Subje

RE: PDK

2002-05-01 Thread Timothy Johnson
Probably not (depending on how 'beginner' you are). For a real beginner, your money might better be spent buying an IDE or finding a text editor with Perl syntax highlighting to help keep you from spending too much time on the little mistakes. If you then become more confident with Perl and fin

Re: Functional dependency

2002-05-01 Thread Jonathan E. Paton
> > I got this problem from a friend and was wondering if anyone could help > > out. > > And quick, because it's due in soon. > > PS. I'll be posting this every day until someone answers it for me^Hy > friend. > > ;-) Thanks Paul for stating the obvious :) Commonly accepted list etiquette su

Re: Email validation syntax

2002-05-01 Thread Kevin Meltzer
Take a look at Email::Valid Cheers, Kevin On Wed, May 01, 2002 at 03:43:07PM -0400, McElwee, Shane ([EMAIL PROTECTED]) said something similar to: > Below I've a regular expression that checks the syntax of an email address. > The problem I'm having is with the underscore "_" . I've tried some >

Email validation syntax

2002-05-01 Thread McElwee, Shane
Below I've a regular expression that checks the syntax of an email address. The problem I'm having is with the underscore "_" . I've tried some different forms of syntax but I know its something simple I'm missing. I think I've been looking at it too long. The validator should allow usernames with

Re: Functional dependency

2002-05-01 Thread Paul Johnson
On Wed, May 01, 2002 at 11:16:32AM -0400, [EMAIL PROTECTED] wrote: > I got this problem from a friend and was wondering if anyone could help > out. And quick, because it's due in soon. PS. I'll be posting this every day until someone answers it for me^Hy friend. ;-) -- Paul Johnson - [EMAIL

RE: perl and java

2002-05-01 Thread Jonathan E. Paton
> > Did someone know it is possible to transfer data between perl and java > > interface without file transfer? I want to print data to the java > > interface instead of the konsole(linux). > > I think this is going to be implemented in Perl 6... but don't know if it's > possible in Perl 5. Go to

RE: perl and java

2002-05-01 Thread Nikola Janceski
I think this is going to be implemented in Perl 6... but don't know if it's possible in Perl 5. > -Original Message- > From: Qi zhang [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 01, 2002 1:56 PM > To: [EMAIL PROTECTED] > Subject: perl and java > > > Hello all, > Did someone know i

perl and java

2002-05-01 Thread Qi zhang
Hello all, Did someone know it is possible to transfer data between perl and java interface without file transfer? I want to print data to the java interface instead of the konsole(linux). Thanks for any help, Beginner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

PDK

2002-05-01 Thread Ned Cunningham
Anybody have any feed back on the Perl Development Kit??? Is it useful for a beginner? Any advise? Thankx -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: checking if domain or IP address

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 08:27 , P lerenard wrote: > an ip address should have 3 dot and 2 (IPv4) > so ii you check for the number of dot you have you will remove some false > guess > > Pierre [..] >> ### }elsif ($nameserver =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/){ >> ### $t

Re: DBI

2002-05-01 Thread Chas Owens
On Wed, 2002-05-01 at 03:05, Schelstraete Bart wrote: > HEllo ppl, > > I hava a problem with Perl:DBI, and I hope somebody can help me. > I'm using perl to get data from the AS/400 DB2 database. > (Perl:DBI)but the data that I'm receiving is not that same as the > data on the database... >

Re: checking if domain or IP address

2002-05-01 Thread P lerenard
an ip address should have 3 dot and 2 (IPv4) so ii you check for the number of dot you have you will remove some false guess Pierre >From: drieux <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: checking if domain or IP address >Date: Tue, 30 Apr 2002 18:07

Re: Perl Issue

2002-05-01 Thread Frank Wiles
On Wed, 1 May 2002 11:11:46 -0400 CMS <[EMAIL PROTECTED]> wrote: > Does Perl, or a script .pl every time someone would > access the site, with that script .pl does perl > open another perl session, of itself ? > eg: 5 people connection, to web site, 5 perl running ?? Yes it will launch 5 P

Functional dependency

2002-05-01 Thread William.Ampeh
I got this problem from a friend and was wondering if anyone could help out. The following is a set of functional dependency for a relation R (A,B,C,D,E,F) with A->D, BE->CDF, C->E, D->B where A->D implies A determines D or D is functionally dependent on A. Questions: 1. Compute the closur

Perl Issue

2002-05-01 Thread CMS
Does Perl, or a script .pl every time someone would access the site, with that script .pl does perl open another perl session, of itself ? eg: 5 people connection, to web site, 5 perl running ?? Thanks- Richard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

Re: mod_perl with existing apache (with apologies for parroting...)

2002-05-01 Thread Matt C.
Ultimately you really should build mod_perl as a static module inside of Apache. Try rebuilding it statically with all your other dso stuff, which is well documented in the mod_perl INSTALL docs. That will make your life much easier. Matt --- Robert Beau Link <[EMAIL PROTECTED]> wrote: > -BE

RE: select from oracle and write to file

2002-05-01 Thread Shah, Urmil
To avoid this error declare variables as my @row; my $oid; before using it, this would solve all your problems. Urmil -Original Message- From: garrett esperum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 5:53 PM To: Shah, Urmil Cc: [EMAIL PROTECTED] Subject: RE: select fro

Re: Editing Root File

2002-05-01 Thread Jonathan E. Paton
> > I'd like to create updating dns and user and password under web. > > but I don't have suid so I cannot change the file or running binary file > > that use root permision... > > let's have that little coffee break moment here and think about this. > > Have you throught about the 'security' is

Re: Filtering HTML

2002-05-01 Thread Frank Wiles
On Wed, 1 May 2002 22:07:38 +1000 "Arran Ubels" <[EMAIL PROTECTED]> wrote: > How would i filter HTML from a String? my $string =~ s/<.*?>//g; This removes everything between <>'s which should catch all HTML, and you don't have to worry about <>'s as data because they would need to

Re: module for time execution

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 06:42 , Charles Lu wrote: [..] >Does anyone know if there is a build in function or module that would > allow me to write a piece of code and have it executed after a certain > time? In other words, if I want some function to run exactly 3 minutes > after a p

Re: GUI's

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 02:01 , Jackson, Harry wrote: > Hi all > > What mailing list or area would be the best place to ask questions on > creating GUI's. I would like to create a front end for connecting and > running queries against an Oracle database purely as a learning > experience.

Re: Editing Root File

2002-05-01 Thread drieux
On Wednesday, May 1, 2002, at 02:04 , Hengky wrote: > i'd like to create updating dns and user and password under web. > but i don't have suid so i cannot change the file or running binary file > that use root permision... let's have that little coffee break moment here and think about this. H

RE: select from oracle and write to file

2002-05-01 Thread DeBaets, Kirk
Between execute and finish add fetchrow_array() to get the result set, and then do with the rows what you wish. E.g., my @row; while ( @row = $sth->fetchrow_array() ){ print "Row: @row\n"; } -Original Message- From: garrett esperum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30,

FW: Name resolution from IP

2002-05-01 Thread Jason Frisvold
Ugh.. Forgot to CC in the list... -Original Message- I use this little subroutine : use Socket; sub nslookup { my $ipaddress = shift; my $dnsname = gethostbyaddr(pack('C4',split(/\./,$ipaddress)),AF_INET); if ((! defined $dnsname) || ($dnsname eq '')) { print "*** $i

Filtering HTML

2002-05-01 Thread Arran Ubels
How would i filter HTML from a String?

English filter ?

2002-05-01 Thread Kevin Cornmell
Please read the disclaimer at the bottom of this e-mail. Dear all, Is there a anything that takes a perl script and translates the special perl variables into their English.pm alias

DBI

2002-05-01 Thread Schelstraete Bart
HEllo ppl, I hava a problem with Perl:DBI, and I hope somebody can help me. I'm using perl to get data from the AS/400 DB2 database. (Perl:DBI)but the data that I'm receiving is not that same as the data on the database... This is a part of my script: $q = $dbh->prepare("selec

module for time execution

2002-05-01 Thread Charles Lu
Hi Does anyone know if there is a build in function or module that would allow me to write a piece of code and have it executed after a certain time? In other words, if I want some function to run exactly 3 minutes after a previous function, how can I specify that in perl? thanks very

RE: tutorials to avoid?

2002-05-01 Thread Bob Showalter
> -Original Message- > From: Robert "Beau" Link [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 30, 2002 8:42 PM > To: [EMAIL PROTECTED] > Subject: tutorials to avoid? > > On the heels of my last note, I'm thinking a tutorial that doesn't > teach automatic use of -w and use strict is a

RE: using strict and -w

2002-05-01 Thread Bob Showalter
> -Original Message- > From: Robert "Beau" Link [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 30, 2002 8:27 PM > To: [EMAIL PROTECTED] > Subject: using strict and -w > > ... And where might I have found that answer within > perldoc? I tried > perldoc -q strict and got "No documentat

GUI's

2002-05-01 Thread Jackson, Harry
Hi all What mailing list or area would be the best place to ask questions on creating GUI's. I would like to create a front end for connecting and running queries against an Oracle database purely as a learning experience. I had a look on CPAN and noticed several Win::32 mailing lists all geared

Re: How to fill and use Hashes

2002-05-01 Thread Felix Geerinckx
on Wed, 01 May 2002 08:44:28 GMT, Tanton Gibbs wrote: > I really don't think you want to use hashes here. A hash is a > one-way association. In other words, I have a person's name and I > want to look up his address or I have a phone number and I want to > look up who lives there. What you are

Re: How to fill and use Hashes

2002-05-01 Thread Tanton Gibbs
I really don't think you want to use hashes here. A hash is a one-way association. In other words, I have a person's name and I want to look up his address or I have a phone number and I want to look up who lives there. What you are asking for is a way to store two objects together. One really

RE: Functional dependency

2002-05-01 Thread Jackson, Harry
>-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > >I got this problem from a friend and was wondering if anyone could help >out. > >The following is a set of functional dependency for a relation R >(A,B,C,D,E,F) with A->D, BE->CDF, C->E, D->B >where A->D implie

Re: Editing Root File

2002-05-01 Thread David vd Geer Inhuur tbv IPlib
Hi Hengky, I assume you work on a Unix server (root). Create a shell-script might be one of the solutions : -r-sr-x--- 1 root apache 24576 Aug 6 1998 /dns.sh You can put in here the exact command you want to run as root. Make sure the file is owned by root and the group is t

How to fill and use Hashes

2002-05-01 Thread David vd Geer Inhuur tbv IPlib
Hi There, I have never used hashes before, althought they seem to be interesting I didn't know the exact use for it. But as times are changing I think I just came to a point where I need a hash, but how do I create one and how do I use it ? Can anyone assist ? this is what I want to accomplish

Editing Root File

2002-05-01 Thread Hengky
i'd like to create updating dns and user and password under web. but i don't have suid so i cannot change the file or running binary file that use root permision... can somebody help me with this...? does anybody have a sample program that can run or edit root file...? pls... Thx. Hengky ==