Re: DBI and fetchrow

2004-05-26 Thread Ramprasad A Padmanabhan
Did you try the sql directly on sql prompt If that works, then the hanging has nothing to do with the query itself. Ram On Thu, 2004-05-27 at 01:54, MCMULLIN, NANCY wrote: > Does anyone know why this script hangs when it's executed? It's probably due to > the complex select statement, but I'm n

Re: Program to scan dictionary for words with letters in a particular set?

2004-05-26 Thread Oliver Schnarchendorf
On Thu, 27 May 2004 00:14:57 -0500, Jim Witte wrote: > Given a file of words W such as 'cat dog at home ...' > and a set of letters L 'aoeuidhtns' > how would I write a program to extract all words in W whose letters > are all in L? Here is an overview that should get you going: Split L with a

Re: HTTP

2004-05-26 Thread Ramprasad A Padmanabhan
Are your sure you want to write your own in perl, then you would have to use LWP or similar modules from CPAN But If you want straight download , why dont you just use tools like "lynx -source" or "wget" or "snarf" Bye Ram On Thu, 2004-05-27 at 01:23, Esposito, Anthony wrote: > Any help for a sc

Re: Program to scan dictionary for words with letters in a particular set?

2004-05-26 Thread Ramprasad A Padmanabhan
I think this is more of an algorithm question, not perl tho very interesting to do it in perl. I am not gr8 in algorithms , but this is what I will do Write a function that will return all the letters sorted in a word For eg for the word home , return ehmo sub wkey { my(@l)=sort split(//,$_[

Program to scan dictionary for words with letters in a particular set?

2004-05-26 Thread Jim Witte
Given a file of words W such as 'cat dog at home ...' (or perhaps read into an array, though that would be a very large array), and a set of letters L (a string 'aoeuidhtns' - perhaps put into a array), how would I write a program to extract all words in W whose letters are all in L? I'm think

Re: statistic solving

2004-05-26 Thread Wiggins d'Anconia
Boon Chong Ang wrote: Hi, If I need to solve normal statistic problem using perl, any cpan module that you all would recommend? How about performing least square and least square error statistical analysis as well. http://search.cpan.org/modlist/Data_and_Data_Types Easiest is to just search CPAN

Re: entering text within a file

2004-05-26 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: I am still having issues with the output as it looks like this... eject 0,0,0 eject 0,0,0 eject 0,0,0 I need to insert eject 0,0,0 before the E string, like so: eject 0,0,0 E00xxx perl -mstrict -we 'my @x = qw(E12345 45678 E90987);for(@x) { s/(^E?\d{5})/eject\t0,0,

statistic solving

2004-05-26 Thread Boon Chong Ang
Hi, If I need to solve normal statistic problem using perl, any cpan module that you all would recommend? How about performing least square and least square error statistical analysis as well. Thank you & best regards, ABC

Re: How to find same filename in subdirectory

2004-05-26 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > Hi, John thanks you comment, the coding is work. But i'm detect have some small > problem in line 7 print "$File::Find::name\n" if $_ eq 'File1'; I test as below > sample 2 is follow you coding. From here i detect nothing return from script. > > But after i amend the

Re: need help(urgent)

2004-05-26 Thread John W. Krahn
Girish N wrote: > > Hi All Hello, > I am stuck with this script which I need to finish today... > > What I am supposed to do is > 1) parse a file and search for included files and insert those > included files in the file. > > Eg. > File1 > Lkdfs > Sdfdsfds > Sdfsdf > Include "one.txt" >

Re: DBI and fetchrow

2004-05-26 Thread John W. Krahn
Nancy McMullin wrote: > > Does anyone know why this script hangs when it's executed? It's > probably due to the complex select statement, but I'm not sure how > to make it work. Sorry, I don't know much about DBI but perhaps these will help: http://lists.perl.org/showlist.cgi?name=dbi-users ht

Re: entering text within a file

2004-05-26 Thread John W. Krahn
[ Top posting fixed ] [EMAIL PROTECTED] wrote: > > "John W. Krahn" <[EMAIL PROTECTED]> 05/25/2004 07:49 PM > > > > You can either use Perl's "in-place" edit feature or use a second file > > to write the data to. Using in-place edit would look something like > > this: > > > > #!/usr/local/bin/p

Re: Array help needed please

2004-05-26 Thread John W. Krahn
William Kolln wrote: > > This is a previous message from April left unanswered. > > Can Anyone Help...thanks if you can! > > I have an array called group_vals. > > This array can be populated by any combination of values > e.g. /sp|lp|ep12|ffp|vid|dvd|bx|bkk|cd|csd/ > > I want to be able

Re: entering text within a file

2004-05-26 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: awesome I am making progress. I used ".bak" instead of ' ' b/c I do not want to remove the file after $ ^ I the edit is done. BUT, I do not want to replace the E strings with the eject string instead I want to put the eject string in from of the E string and write

Re: entering text within a file

2004-05-26 Thread DBSMITH
here is what I use in awk language to get eject 0,0,0 E001420 eject 0,0,0 E001430 awk '{print "eject""\t""0,0,0""\t" $1 }' filename > newoutput. the curren code below is replacing E strings with eject strings Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams 614-566-4145 "Jupiter

Re: entering text within a file

2004-05-26 Thread DBSMITH
awesome I am making progress. I used ".bak" instead of ' ' b/c I do not want to remove the file after $ ^ I the edit is done. BUT, I do not want to replace the E strings with the eject string instead I want to put the eject string in from of the E string and write now it is replacing ? t

DBI and fetchrow

2004-05-26 Thread MCMULLIN, NANCY
Does anyone know why this script hangs when it's executed? It's probably due to the complex select statement, but I'm not sure how to make it work. Also, is there a good 'DBI with SQL with Perl' book out there? #!c:/activeperl/bin/perl use strict; use warnings; use DBI; use CG

Re: Array help almost correct

2004-05-26 Thread Chris Charley
[snip] > my $acceptable = qr/^(?:sp|lp|ep12|ffp|vid|dvd|bx|bkk|cd|csd)$/; > > and then using $acceptable to do the matchings, such as > > grep /$acceptable/, @array > > > it would be faster and more readable :-) If the acceptable list is that large, using a hash would be TMTOWTDI :-) #!/usr

Re: HTTP

2004-05-26 Thread Wiggins d Anconia
> > Any help for a script downloading files from a http site? > http://search.cpan.org/~gaas/libwww-perl-5.79/lib/LWP.pm http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

HTTP

2004-05-26 Thread Esposito, Anthony
Any help for a script downloading files from a http site? Tony Esposito Oracle Developer, Enterprise Business Intelligence XO Communications Plano, TX 75074 Work Phone: 972-516-5344 Work Cell: 972-670-6144 Email: [EMAIL PROTECTED]

RE: SCP help

2004-05-26 Thread John Pretti
-Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 2:09 PM To: John Pretti; [EMAIL PROTECTED] Subject: Re: SCP help > > All, > > I have developed a CGI that will take information from a CGI based form and > SCP a specific file to a remote

Re: entering text within a file

2004-05-26 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: ok does this s/^(?=E\d{5})/eject\t0,0,0\t\n/ while <>; say... from the beginning of the line match 0 or 1 E's with any digits then print ?=E is sort of odd, I think you mean E? so it is substituting the first part with the second part s/^E?\d{5}/eject\t0,0,0\t\n/ will ta

Re: SCP help

2004-05-26 Thread Wiggins d Anconia
> > All, > > I have developed a CGI that will take information from a CGI based form and > SCP a specific file to a remote server. I am having some troubles and I > think I need to escape something. Anyone have any ideas? Snippet of code is > as follows: > > # SCP commands > my $scp_cmd = "/us

RE:How to find same filename in subdirectory

2004-05-26 Thread Jan Eden
Hi, [EMAIL PROTECTED] wrote on 26.05.2004: >Hi, John thanks you comment, the coding is work. But i'm detect have >some small problem in line 7 print "$File::Find::name\n" if $_ eq >'File1'; I test as below sample 2 is follow you coding. From here i >detect nothing return from script. > >But after

Re: entering text within a file

2004-05-26 Thread DBSMITH
ok does this s/^(?=E\d{5})/eject\t0,0,0\t\n/ while <>; say... from the beginning of the line match 0 or 1 E's with any digits then print the eject string? I am not following the { 5 }. my E string is 6 characters long, so why the 5? isn't there a insert regular expression? use strict; my $ej

SCP help

2004-05-26 Thread John Pretti
All, I have developed a CGI that will take information from a CGI based form and SCP a specific file to a remote server. I am having some troubles and I think I need to escape something. Anyone have any ideas? Snippet of code is as follows: # SCP commands my $scp_cmd = "/usr/bin/scp"; my $scp_o

RE:How to find same filename in subdirectory

2004-05-26 Thread lktee
Hi, John thanks you comment, the coding is work. But i'm detect have some small problem in line 7 print "$File::Find::name\n" if $_ eq 'File1'; I test as below sample 2 is follow you coding. From here i detect nothing return from script. But after i amend the coding become print "$File::Find::nam

Re: Array help almost correct

2004-05-26 Thread Jose Alves de Castro
On Wed, 2004-05-26 at 15:07, willy.k wrote: > Jose > > Many thanks for replying so quickly. > I will explain again, sorry but is complicated. > > > > ### > I have an array called group_vals. > > This array can be populated by any combination of values > e.g. /sp|lp|e

Re: Need help in building a pl to a pm

2004-05-26 Thread Wiggins d Anconia
> first, sorry for top post. Second, I am trying to convert my html/pm files > to oop (pm). Can anyone give me some understanding of perl modules and some > examples. Specifically to 'bless()' and a general over view. I have searched > cpan/perl monks etc. > perldoc -f bless Along with, perldoc:

Need help in building a pl to a pm

2004-05-26 Thread Roberts Mr Richard L
first, sorry for top post. Second, I am trying to convert my html/pm files to oop (pm). Can anyone give me some understanding of perl modules and some examples. Specifically to 'bless()' and a general over view. I have searched cpan/perl monks etc. thanks in advance R. -Original Message-

Re: Array help needed please

2004-05-26 Thread Jose Alves de Castro
On Wed, 2004-05-26 at 12:05, William Kolln wrote: > This is a previous message from April left unanswered. > > > Can Anyone Help...thanks if you can! > > > > I have an array called group_vals. > > This array can be populated by any combination of values > e.g. /sp|lp|ep12|ffp|vid|dvd|bx|

Fw: need help(urgent)

2004-05-26 Thread LRMK
can you post the exact format of your include line and what is the logic to map the base to actual values. in base/includefile.ext how do we get to know the value of base here is a general solution assumin that tha format of your include line is include "base/filename.extenction" all

Re: need help(urgent)

2004-05-26 Thread LRMK
can you post the exact format of your include line and what is the logic to map the base to actual values. in base/includefile.ext how do we get to know the value of base here is a general solution assumin that tha format of your include line is include "base/filename.extenction" all the nass

Array help needed please

2004-05-26 Thread William Kolln
This is a previous message from April left unanswered. Can Anyone Help...thanks if you can! I have an array called group_vals. This array can be populated by any combination of values e.g. /sp|lp|ep12|ffp|vid|dvd|bx|bkk|cd|csd/ I want to be able to say that: if the array contains any c

Help: Connect Perl and MSAccess database

2004-05-26 Thread Ranjith Eyacheruvatt
Hello Now I started in perl, I could do simple programs such as string manipulations, but i could not connect to MSAccess database located at my server. This is the code i used. file://=ADO code start here print "Content-Type: text/html\n\n"; use "win32::OLE" Set conn = Server.C

Re: need help(urgent)

2004-05-26 Thread LRMK
try this, this should work __ #Pass the file name as a parameter sub printFile($){ my ($fname) = @_; #Load the spesified file my @lines = readFile($fname); chomp @lines;

Re: need help(urgent)

2004-05-26 Thread Jose Alves de Castro
On Wed, 2004-05-26 at 12:09, Jose Alves de Castro wrote: > > What I am supposed to do is > > > > 1) parse a file and search for included files and insert those > > included files in the file. Lets get step by step with my solution (just so you understand what it is doing) > Try this: (It

Re: need help(urgent)

2004-05-26 Thread Jose Alves de Castro
On Wed, 2004-05-26 at 11:49, Girish N wrote: > Hi All > > I am stuck with this script which I need to finish today... > > > > What I am supposed to do is > > 1) parse a file and search for included files and insert those > included files in the file. > > Eg. > > File1 > > Lkdfs > >

Re: need help(urgent)

2004-05-26 Thread Ramprasad A Padmanabhan
First of all learn how to use a newsgroup 1) Use a proper subject 2) Post what you have tried 3) Do not expect a ready made solution... Even though a lot of good people around would give u that , but u dont learn that way What you could do is write a function file2str that reads a file and retu

need help(urgent)

2004-05-26 Thread Girish N
Hi All I am stuck with this script which I need to finish today... What I am supposed to do is 1) parse a file and search for included files and insert those included files in the file. Eg. File1 Lkdfs Sdfdsfds Sdfsdf Include "one.txt" Sdfdsf Sdfsdf Werewr Tytry Where one

RE: Question of memory management in Perl

2004-05-26 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > I supose that the end result of: > > for ($init_cnt=0;$init_cnt<=$#out_array_bin;$init_cnt++) { >$out_array_bin[$init_cnt] = ""; > } > > and > > '@out_array_bin = ();' or 'undef @out_array_bin;' > > is not the some, is it? No it's not. Suppose

Re: How to find same filename in subdirectory

2004-05-26 Thread John W. Krahn
Lktee wrote: > > Hi, now I design another way. Hello, > First I request user enter the directory want to search first, if the > directory exist in the system, script will search the entire directory. If > the filename is same will display out, else no result will return. If > directory not exist

Re: Detecting the Country and other information of a IP address

2004-05-26 Thread John W. Krahn
Lrmk wrote: > > I want one of my scripts to process IP addreses and detect the country and > other information like city, ISP, and the IP range which has the same > attributes > > I tryied writing a script to post the IP address to regional network > information center's web site's who is form an

RE: How to find same filename in subdirectory

2004-05-26 Thread LKTee
Hi, now I design another way. First I request user enter the directory want to search first, if the directory exist in the system, script will search the entire directory. If the filename is same will display out, else no result will return. If directory not exist will request user try another dir

RE: Question of memory management in Perl

2004-05-26 Thread Marcos . Rebelo
> -Original Message- > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 25, 2004 8:08 PM > To: [EMAIL PROTECTED] > Subject: RE: Question of memory management in Perl > > > From: [EMAIL PROTECTED] > > I don't know for sure the effect of: > > > > @out_a

RE: Question of memory management in Perl

2004-05-26 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > I don't know for sure the effect of: > > @out_array_bin = map {""} (@out_array_bin); > > instead of > > for ($init_cnt=0;$init_cnt<=$#out_array_bin;$init_cnt++) { >$out_array_bin[$init_cnt] = ""; > } > > But is more readable. Neither makes much s