MySQL+foreach loop.........roy

2004-11-03 Thread Roime bin Puniran
I have doing some modification on my previous script. I used foreach loop to read the content of directory. While each file are read, then i used foreach loop to open the file and imported it into mysql. The script are running successfull, but in mysql database, it's contain only the range of da

Re: Extracting Directories and Sub Directories and Counting

2004-11-03 Thread Ron Smith
--- Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Ron Smith wrote: > > If I wanted to add more fields to my output, which > construct would I > > use to create more fields; something like the > following? > > > > basenamecountextensionsize > > > > ...maybe 'HoH', or just expand on

Re: Mass Editing 125 files

2004-11-03 Thread John W. Krahn
Dave Kettmann wrote: Hi List, Hello, I know the number of files probably doesnt matter, but just in case it does I thought I would mention it. What I need to do, is look thru 125 zone files and change the IPs. Or to be less specific, I need a Find/Replace script that will run thru a list of files w

Re: start http request and move on

2004-11-03 Thread JupiterHost.Net
The idea is to be able to submit data to $url for it to be processed (which may take a while) without waiting for it to finish. LWP::Parallel does mutiple $urls in parallel but I want to submit a single url like you would with LWP but not wait, does that make sense? Would a fork() of some sort

Re: using 'my' problem

2004-11-03 Thread JupiterHost.Net
Zeus Odin wrote: To see the code that is actually getting compiled, try: $ perl -MO=Deparse -mstrict -we 'my @foo;print @foo;' Ok, not sure what that has to do with @ and % not getting uninitialized warnings and $ getting them... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

RE: How to get name of script

2004-11-03 Thread Christopher Maujean
On Wed, 2004-11-03 at 16:06, Jim wrote: > > How do I get the name of the current PERL script I am > > running? The answer to this question may be very obvious but > > I can't seem to locate it in my books or other resources. > > > > Thanks in advance, > > > > # strip the path info to the scr

RE: How to get name of script

2004-11-03 Thread Jim
> How do I get the name of the current PERL script I am > running? The answer to this question may be very obvious but > I can't seem to locate it in my books or other resources. > > Thanks in advance, > # strip the path info to the script: (my $prog = $0) =~ s/^.*[\\\/]//; --- Outgoing ma

Re: using 'my' problem

2004-11-03 Thread Zeus Odin
To see the code that is actually getting compiled, try: $ perl -MO=Deparse -mstrict -we 'my @foo;print @foo;' "JupiterHost.Net" <[EMAIL PROTECTED]> wrote in message ... > Correct, except I still think @ ans % don't get uninitialized value > warnings while $ does: > > $perl -mstrict -we 'my $foo

RE: How to get name of script

2004-11-03 Thread Rajesh Dorairajan
$0 -Original Message- From: Zielfelder, Robert [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 12:18 PM To: Perl Beginners List (E-mail) Subject: How to get name of script How do I get the name of the current PERL script I am running? The answer to this question may be ver

Re: Mass Editing 125 files

2004-11-03 Thread Bee
One more note, your loop and substitution can be simpliy like this : for my $i ( 0.. $#files ) { open FH, >>$files[$i] or die $!; { while () { tr/1/5/; print } close FH ; # I think close FH is quite important here... } HTH, Bee - Original Message - From: "Dave Kettmann" <[EMAIL

Re: Mass Editing 125 files

2004-11-03 Thread Bee
"zone.file3.com" ) # A semi-colon missed here for ( my $i . ) HTH, Bee - Original Message - From: "Dave Kettmann" <[EMAIL PROTECTED]> To: "Perl List (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, November 04, 2004 6:28 AM Subject: Mass Editing 125 files Hi List, I know the nu

Mass Editing 125 files

2004-11-03 Thread Dave Kettmann
Hi List, I know the number of files probably doesnt matter, but just in case it does I thought I would mention it. What I need to do, is look thru 125 zone files and change the IPs. Or to be less specific, I need a Find/Replace script that will run thru a list of files whose names are in an arr

RE: start http request and move on

2004-11-03 Thread Moon, John
-Original Message- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 4:23 PM To: [EMAIL PROTECTED] Subject: start http request and move on Hey group, Not sure how I'd go about doing a url (via LWP probably) but not wait for it to return. print "Starti

Is that a DB server need to be installed ?

2004-11-03 Thread Bee
Hi, Just start on study about Database programming... Just wonder is that a real DB server is needed to be installed before I start my coding ? If so... which kind of server ( and modules) is recommanded, easiest to get start for beginners ? I assume that I will deal with both simple short data

Re: Which perldoc discuss about loops ?

2004-11-03 Thread Bee
Thanks Jenda ! Got it now =) - Original Message - From: "Jenda Krynicky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 04, 2004 5:57 AM Subject: Re: Which perldoc discuss about loops ? > From: "Bee" <[EMAIL PROTECTED]> > > Just a quick question, which p

Re: Which perldoc discuss about loops ?

2004-11-03 Thread Jenda Krynicky
From: "Bee" <[EMAIL PROTECTED]> > Just a quick question, which perldoc talking about loops ? > for, while, do until... ? I just can't find it out perlsyn Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed

Which perldoc discuss about loops ?

2004-11-03 Thread Bee
Hi, Just a quick question, which perldoc talking about loops ? for, while, do until... ? I just can't find it out TIA, Bee

start http request and move on

2004-11-03 Thread JupiterHost.Net
Hey group, Not sure how I'd go about doing a url (via LWP probably) but not wait for it to return. print "Starting...\n"; nowaiturl("$url?foo=bar"); print "$url has been submitted. When it finishes running you'll get an email. Have a super day\n"; # or whatever :) The idea is to be able to submi

Re: How to get name of script

2004-11-03 Thread Gunnar Hjalmarsson
Robert Zielfelder wrote: How do I get the name of the current PERL script I am running? The answer to this question may be very obvious but I can't seem to locate it in my books or other resources. The natural place to look for the answer to such a question is "perldoc perlvar". -- Gunnar Hjalmars

RE: Illegal octal digit??

2004-11-03 Thread Bob Showalter
Konopaske Jr,Raymond E wrote: > Forgive me if this is a dumb question. I'm a newcomer to Perl. > > I was trying to do something the other day and ran across this odd > little problem. > > I had some lines in my script that looked something like this: > > $ddd = 8; > ... > if ($ddd == 08) {print

RE: How to get name of script

2004-11-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Zielfelder, Robert wrote: > How do I get the name of the current PERL script I am running? The > answer to this question may be very obvious but I can't seem to > locate it in my books or other resources. > > Thanks in advance, > > Rob Zielfelder $0 holds the info. Wags ;) **

Illegal octal digit??

2004-11-03 Thread Konopaske Jr,Raymond E
Forgive me if this is a dumb question. I'm a newcomer to Perl. I was trying to do something the other day and ran across this odd little problem. I had some lines in my script that looked something like this: $ddd = 8; ... if ($ddd == 08) {print ('hi');} When I tried to run, I would get the f

How to get name of script

2004-11-03 Thread Zielfelder, Robert
How do I get the name of the current PERL script I am running? The answer to this question may be very obvious but I can't seem to locate it in my books or other resources. Thanks in advance, Rob Zielfelder -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: Sourcing Configuration files

2004-11-03 Thread Larsen, Errin M HMMA/IT
-Original Message- From: Gavin Henry [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 4:15 AM To: Perl Beginners List Subject: Re: Sourcing Configuration files Chris Devers said: >> On Tue, 2 Nov 2004, Gavin Henry wrote: >> >>> What is the easiest way to move variable declarat

Re: using 'my' problem

2004-11-03 Thread JupiterHost.Net
Zeus Odin wrote: The reason why you don't get the uninitialized warning in the 2nd and 3rd examples below is that your print is within the for loop. Since both @files and keys %files contain nothing, the innards of the for loop NEVER get executed. Therefore, the print is not attempted at all for e

Re: how to benchmark connection

2004-11-03 Thread JupiterHost.Net
Ing. Branislav Gerzo wrote: Hi all, anoyone could me show the start point for measuring response time of my $start = time(); # do connection my $stop = time(); my $lapse = $stop - $start; print "It took $lapse seconds\n"; search http://search.cpan.org for Time::HiRes The 1st 3 results look very pr

current perl memory usage

2004-11-03 Thread Bryan R Harris
In "Learning Perl" 3.1, it says: "Arrays can have any number of elements. The smallest array has no elements, while the largest array can fill all of available memory. Once again, this is in keeping with Perl's philosophy of 'no unnecessary limits.'" Is there any way to get the free vs. used me

Re: Sourcing Configuration files

2004-11-03 Thread Chris Devers
On Wed, 3 Nov 2004, Gavin Henry wrote: > Chris Devers said: > > On Tue, 2 Nov 2004, Gavin Henry wrote: > > > >> What is the easiest way to move variable declarations out into a file > >> in /etc/ and requiring a perl program to read them in at startup. If > >> they are not there, then the program

Re: Creating Microsoft Word Document with Perl

2004-11-03 Thread Rok Jaklic
Thank you both for usefull information. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Best FREE Perl installation for Windows??

2004-11-03 Thread NYIMI Jose \(BMB\)
> -Original Message- > From: Lone Wolf [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 03, 2004 3:52 AM > To: [EMAIL PROTECTED] > Subject: Best FREE Perl installation for Windows?? > > > I need to get back to an installed Windows Perl environment. > What's the best free option

Re: Best FREE Perl installation for Windows??

2004-11-03 Thread Robert Hicks
ActiveState On 11/2/04 9:52 PM, in article [EMAIL PROTECTED], "Lone Wolf" <[EMAIL PROTECTED]> wrote: > I need to get back to an installed Windows Perl environment. What's the > best free option available out there, that everyone would recommend? I can > do installs without too much issues, so

Re: Sourcing Configuration files

2004-11-03 Thread Gavin Henry
Chris Devers said: > On Tue, 2 Nov 2004, Gavin Henry wrote: > >> What is the easiest way to move variable declarations out into a file >> in /etc/ and requiring a perl program to read them in at startup. If >> they are not there, then the program must complain. > > Have you considered using Tie::Fi