out of memory

2002-07-12 Thread Paresh Kakrecha
Hi , Here is the my script which fetch the data from oracle while ( ($data=$sth->fetchrow ) { print $data; } since it is a huge data around ( 650 kb ) , this gives out of memory error. Anyone knows how to solve this issue Thanks in advance -Paresh. -- To unsubscribe, e-mail: [EMAIL PRO

Re: Avoiding Duplicate Entries

2002-07-12 Thread drieux
On Wednesday, July 10, 2002, at 09:12 , John W. Krahn wrote: [..] > > Something like that. :-) But what if the log file has been rotated and > the last line is no longer in the file? > > my $last_line = get_last_line_from_cache(); > > open LOG, or die "$!"; > > while ( ) { > rollback_

Re: Any warning if I use '03E9' like string as a key in hash ?

2002-07-12 Thread drieux
On Friday, July 12, 2002, at 02:06 , Connie Chan wrote: [..] p0: I will defer to your understanding of chinese 'encryption' - since I haven't been in that since the wade-giles v. pin-yin debates but if it is a simple mapping as you suggest. > b855=cdf2 > a456=d5c9 > a454=c8fd > a457=c

RE: anonymous reference problems

2002-07-12 Thread Timothy Johnson
>I guess my question is: aren't these two equal statements? > > my $hash=\%tmpEntry; > my $hash={ %tmpEntry }; > >This is what I get from the command line: No, they're not the same. See below: ---===+===--- my $hash = \%tmpEntry; #creates a new scalar varia

Re: anonymous reference problems

2002-07-12 Thread Shawn
Hey Jeff, > >I have a loop, each iteration through the loop the hash %tmpEntry gets a > >new set of values. And each iteration through the loop I place this hash > >into another hash, like so: > > > >[snip] > > print "Added entry.\n"; > >$oncall{$tmpEntry{'StartDate'}} = \%tmpEntry; > >[snip] > >

RE: Help installing Mail::Audit

2002-07-12 Thread Beau E. Cox
David - Mail-Audit is not available for Win32. Under ppm3 you can use the 'describe' command: ppm> describe mail-audit The output shows available platforms (in this case linux and solaris). Aloha => Beau. -Original Message- From: David Gerler [mailto:[EMAIL PROTECTED]] Sent: Fr

Re: How can I get element location in array ?

2002-07-12 Thread Connie Chan
Right, I better set $GetLocation = -1, but, what I am looking for is if there is something working like grep does ? @elemLoc = grepIndex (/pattern/, @list); # something like that ? And is that I can't aviod to use loop to search for matching ? Rgds, Connie - Original Message - From: "

Code Review/Mentoring session at TPC (reminder)

2002-07-12 Thread Peter Scott
Reminder: For those of you attending the Perl Conference #6 (or Open Source Conference), there is a golden opportunity to get some free coaching and consultation on your work. A Birds-of-a-Feather session on "Perl Mentoring/Code Reviews" will be given for the third year running. Some of the t

Re: Any warning if I use '03E9' like string as a key in hash ?

2002-07-12 Thread Connie Chan
Hee... sorry, I just think if I can make the problem becomes more visible and simple What I am now doing is a transation script. From Traditional Chinese(Big5) to Simiplified Chinese(GB2312). As Note, Chinese Chars is a combination of 2 bytes... So, I got every word back to ASCII format, and

Help installing Mail::Audit

2002-07-12 Thread David Gerler
I am running win200 and ActiveState Perl. I am attempting to install Mail-Audit with the PPM. I have successfully install Mail-tools and Mime-tools. However, when I use "install Mail-Audit", I get "Error: no suitable installation target found for package Mail-Audit." Any help anyone can give

Re: How can I get element location in array ?

2002-07-12 Thread Jeff 'japhy' Pinyan
On Jul 13, Connie Chan said: >I now have an array like this : @list = ('1234', '4567', '789A', 'BCDE', >'FGHI', .); > >and now, I want to find where is the location of 'BCDE' in list , so I >write like this : > >my @list = ('1234', '4567', '789A', 'BCDE', 'FGHI'); >my $GetLocation = 0; >my $v

RE: Any warning if I use '03E9' like string as a key in hash ?

2002-07-12 Thread Timothy Johnson
My only thought is that seeing it out of context, it's not very descriptive. I usually try to pick key names that will help me figure out what I was thinking when I made the hash. But like I said, it depends on context. Otherwise if -w and strict don't care, why should I? :) -Original Messa

Any warning if I use '03E9' like string as a key in hash ?

2002-07-12 Thread Connie Chan
Rgds, Connie

How can I get element location in array ?

2002-07-12 Thread Connie Chan
Hi all, I now have an array like this : @list = ('1234', '4567', '789A', 'BCDE', 'FGHI', .); and now, I want to find where is the location of 'BCDE' in list , so I write like this : my @list = ('1234', '4567', '789A', 'BCDE', 'FGHI'); my $GetLocation = 0; my $value = 'BCDE'; for (my $at

RE: Problem in fetching CLOB data using perl DBI

2002-07-12 Thread TomST
I use the oracle driver to retrieve data from my database. You should download and install it along with DBI. #!/usr/local/bin/perl use strict; use DBI; my $statement = "SELECT * from table"; my $dbh = DBI->connect('dbi:Oracle:host=hostname;sid=mysid','username','password') or die "could not

Re: DBF File

2002-07-12 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > Here are some lines that may help you > this will open and write to a database file. > > my $database = 'c:\apache\your.dbf'; this is where you define the > .dbf file > > open (DATABASE, ">>$database"); > flock (DATABASE, 2); > print DATABASE "$username|$password|$dat

Re: Win32 registry question

2002-07-12 Thread Jenda Krynicky
From: "Edouard Beaugard" <[EMAIL PROTECTED]> > Does anyone have a script that will query a registry key on a remote > PC? I'm doing some maintenance work this would really help a lot. > > Thanks, > Ed Beaugard Assuming you installed my Win32::Registry2 patch : use Win32::Registry; $remoteHKLM

Problem in fetching CLOB data using perl DBI

2002-07-12 Thread Paresh Kakrecha
Hi , I have perl script to fetch CLOB data from oracle table Table structure is ID number ( 5) long_field clob Perl code : #!/usr/local/bin/perl5 use DBI qw(:sql_types); $dbh= DBI->connect ( . ); $dbh->{LongReadLen}=512*1024; $sql="select * from table"; $sth = $dbh->prep

Re: anonymous reference problems

2002-07-12 Thread Chas Owens
On Fri, 2002-07-12 at 15:48, Craig Moynes/Markham/IBM wrote: > I have a loop, each iteration through the loop the hash %tmpEntry gets a > new set of values. > And each iteration through the loop I place this hash into another hash, > like so: > > [snip] > print "Added entry.\n"; > $oncall{$tmpEn

Re: anonymous reference problems

2002-07-12 Thread Craig Moynes/Markham/IBM
Thanks, two little braces should solve all problems - Craig Moynes [EMAIL PROTECTED] "Jeff 'ja

Re: anonymous reference problems

2002-07-12 Thread Shawn
- Original Message - From: "Craig Moynes/Markham/IBM" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 12, 2002 2:48 PM Subject: anonymous reference problems > I have a loop, each iteration through the loop the hash %tmpEntry gets a > new set of values. > And each iterati

Re: anonymous reference problems

2002-07-12 Thread Jeff 'japhy' Pinyan
On Jul 12, Craig Moynes/Markham/IBM said: >I have a loop, each iteration through the loop the hash %tmpEntry gets a >new set of values. And each iteration through the loop I place this hash >into another hash, like so: > >[snip] > print "Added entry.\n"; >$oncall{$tmpEntry{'StartDate'}} = \%tmpE

anonymous reference problems

2002-07-12 Thread Craig Moynes/Markham/IBM
I have a loop, each iteration through the loop the hash %tmpEntry gets a new set of values. And each iteration through the loop I place this hash into another hash, like so: [snip] print "Added entry.\n"; $oncall{$tmpEntry{'StartDate'}} = \%tmpEntry; [snip] tmpEntry is defined outside the loop

Re: Date and Time

2002-07-12 Thread Peter Scott
At 11:18 AM 7/12/02 -0500, David T-G wrote: >Peter, et al -- > >...and then Peter Scott said... >% >... >% code. (Yes, IMHO, if you insist.) My students see it in every program >% I show them, from Hello World onward. I tell them that if anyone gives >% them code without it to maintain, they sh

RE: an error in a simple regexp

2002-07-12 Thread Timothy Johnson
Ooh. I like that better than mine. :) -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 11:08 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: an error in a simple regexp On Jul 12, Dusan Juhas said: >I typed this simple cm

RE: an error in a simple regexp

2002-07-12 Thread Balint, Jess
You need '?'; echo 123 | perl -pe 's/(\d?)(\d)/$1.$2/g' [Jess] -Original Message- From: Dusan Juhas [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 12:17 PM To: [EMAIL PROTECTED] Subject: an error in a simple regexp Hi, I typed this simple cmd in the bash: echo 123 |perl -pe 's

RE: an error in a simple regexp

2002-07-12 Thread Timothy Johnson
That's because after your regex has processed the first two numbers, it moves on to the next two numbers. If you inputted 1234, you would probably get back "1.23.4". If I were you, I'd try something more like this: my @numarray = split(//,$_); $_ = join('.',$_); -Original Message- Fro

Re: an error in a simple regexp

2002-07-12 Thread Janek Schleicher
Dusan Juhas wrote at Fri, 12 Jul 2002 18:16:44 +0200: > Hi, > I typed this simple cmd in the bash: > echo 123 |perl -pe 's/(\d)(\d)/$1.$2/g' > and expected ouput like > 1.2.3 > but obtained this one: > 1.23 > First your regexp finds (1)(2) what is a matching. So 1.2 is written. Then 3 is left,

RE: Win32 registry question

2002-07-12 Thread Timothy Johnson
Here's a littel tutorial I wrote for a friend of mine. It shows the basics of setting/reading keys. -Original Message- From: Edouard Beaugard [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 11:02 AM To: [EMAIL PROTECTED] Subject: Win32 registry question Hello, Anyone have a

Re: an error in a simple regexp

2002-07-12 Thread Jeff 'japhy' Pinyan
On Jul 12, Dusan Juhas said: >I typed this simple cmd in the bash: >echo 123 |perl -pe 's/(\d)(\d)/$1.$2/g' >and expected ouput like >1.2.3 >but obtained this one: >1.23 The reason you don't get "1.2.3" is because by the time Perl has matched "12", it can't match the "2" again. Here's a working

RE: Fork to run a sub -process

2002-07-12 Thread Bob Showalter
> -Original Message- > From: George Szynal [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 12, 2002 1:34 PM > To: Bob Showalter; 'chad kellerman'; [EMAIL PROTECTED] > Subject: Re: Fork to run a sub -process > > > Where is the command that runs inside the fork (ie. > _lengthy_process run

Win32 registry question

2002-07-12 Thread Edouard Beaugard
Hello, Anyone have a script that will query the registry for the value of a particular key? I'm doing some maintenance work and haven't been able to figure out the TieHash way of accessing the registry. Thanks, Ed Beaugard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

Win32 registry question

2002-07-12 Thread Edouard Beaugard
Hello, Does anyone have a script that will query a registry key on a remote PC? I'm doing some maintenance work this would really help a lot. Thanks, Ed Beaugard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

an error in a simple regexp

2002-07-12 Thread Dusan Juhas
Hi, I typed this simple cmd in the bash: echo 123 |perl -pe 's/(\d)(\d)/$1.$2/g' and expected ouput like 1.2.3 but obtained this one: 1.23 What's wrong and how to write a regexp cmd which will transfer a number to digits with dots in between? eg: 1234 -> 1.2.3.4 Thanx Regards, Dusan -- To uns

Re: source a script from with perl

2002-07-12 Thread Jeff 'japhy' Pinyan
On Jul 12, drieux said: > >On Thursday, July 11, 2002, at 12:08 , Carson Wilcox wrote: > >> I have a need to source a ksh script from within a perl script. >> Does anyone know if this is possible and how to do it. > >You may need to help us out here - since this sounds like >you have a set of var

Re: DBF File

2002-07-12 Thread jffusion
Hi Here are some lines that may help you this will open and write to a database file. my $database = 'c:\apache\your.dbf'; this is where you define the .dbf file open (DATABASE, ">>$database"); flock (DATABASE, 2); print DATABASE "$username|$password|$date\n"; flock (DATABASE, 8); close (DATAB

Re: fastest regexp: split or (.*)?

2002-07-12 Thread drieux
On Friday, July 12, 2002, at 12:31 , Paul Tremblay wrote: > On Thu, Jul 11, 2002 at 09:17:18PM -0700, drieux wrote: >> http://www.wetware.com/drieux/pbl/Other/BenchMarks/split_v.re_for_RTF.txt > > Thanks. It appears splitting is quickest. that is not a 'generalizable' solution - as there are ca

Re: Pass variables from perl to asp

2002-07-12 Thread drieux
On Friday, July 12, 2002, at 09:24 , Peter wrote: > is it possible to pass variables from perl to asp... there are several ways to pass 'stuff' around - a) simple numerical style by testing for the exit value traditionally the shell exits with 0 if all is ok

Re: Fork to run a sub -process

2002-07-12 Thread George Szynal
Where is the command that runs inside the fork (ie. _lengthy_process running in the fork)? Forking example: for my $server (qw(huey duey louie)) { defined(my $pid = fork) or die "Couldn't fork: $!"; # forked command(s) begin/end here? unless ($pid) { do_lengthy

RE: Fork to run a sub -process

2002-07-12 Thread Bob Showalter
> -Original Message- > From: chad kellerman [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 12, 2002 12:57 PM > To: [EMAIL PROTECTED] > Subject: Fork to run a sub -process > > > Hi everyone, > > I am stuck. I have a perl script that I wrote. It runs > on a Solaris 8 > box and go

Fork to run a sub -process

2002-07-12 Thread chad kellerman
Hi everyone, I am stuck. I have a perl script that I wrote. It runs on a Solaris 8 box and goes out to linux boxes and tars up user data and mysql data and stores it on particular drives of the sun box. Right now the script only goes out and tars up one server at a time. I was think

Pass variables from perl to asp

2002-07-12 Thread Peter
is it possible to pass variables from perl to asp... from my asp page (running on unix/apache), id like to call a perl script (module maybe?) and have the script return back something to the asp page, much like a function. is that possible??? and i would like to do this without any redirections

Re: Date and Time

2002-07-12 Thread David T-G
Peter, et al -- ...and then Peter Scott said... % ... % code. (Yes, IMHO, if you insist.) My students see it in every program % I show them, from Hello World onward. I tell them that if anyone gives % them code without it to maintain, they should refuse if at all % possible. Later on I sh

RE: disable printing an output of a perl script file

2002-07-12 Thread Bob Showalter
> -Original Message- > From: FLAHERTY, JIM-CONT [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 12, 2002 7:25 AM > To: Beginners (E-mail) > Subject: disable printing an output of a perl script file > > > I have a quiz program, the script queries the DB and print to > the browser a > tes

Re: source a script from with perl

2002-07-12 Thread Carson Wilcox
That's what I wound up doing, a wrapper script. Thanks for the response Carson -- Original Message -- From: drieux <[EMAIL PROTECTED]> Date: Fri, 12 Jul 2002 08:34:39 -0700 > >On Thursday, July 11, 2002, at 12:08 , Carson Wilcox wrote: > >> I have a ne

Re: disable printing an output of a perl script file

2002-07-12 Thread zentara
On Fri, 12 Jul 2002 07:25:19 -0400, [EMAIL PROTECTED] (Jim-Cont Flaherty) wrote: >I have a quiz program, the script queries the DB and print to the browser a >test for the student to take. I would like to prevent them from printing >that test. All my clients are IE 6.0 I don't think that is pos

Re: source a script from with perl

2002-07-12 Thread drieux
On Thursday, July 11, 2002, at 12:08 , Carson Wilcox wrote: > I have a need to source a ksh script from within a perl script. > Does anyone know if this is possible and how to do it. You may need to help us out here - since this sounds like you have a set of variables being assigned in a ksh fa

RE: Date

2002-07-12 Thread Timothy Johnson
You could always try storing the value in time() format. (E.g. print OUTFILE time."\n";) Then you can check to see if the file is over two days old like this: my $time = time; if($time > $filetime + 172800){ unlink $file; } #172800 is the number of seconds in two days. -Original Messa

Re: Date

2002-07-12 Thread Craig Moynes/Markham/IBM
What I tend to do is use the Time::Local module, specifically them timelocal funciton. It's like the reverse of the localtime function. You give timelocal a series of parameters defining a date and it returns you the seconds since epoch. Then you can add (24*60*60)x2 for 2 days worth of seconds.

Re: Date

2002-07-12 Thread Craig Moynes/Markham/IBM
You could write a script that reads a file that contains a list of files. Compare the modification file of each file to the current date, if the file is at least two days old try and delete it. Then schedule this script to run everyday, take a look at: man crontab Cheers, -

Re: Date

2002-07-12 Thread Francesco Guglielmo
Anders Holm wrote: >>I need to do a Perl script who do a certain command after 2 days.Example: >>my file contains >> >>8 Jul 2002 >> >>when I lunch the script it must control the date and if it's equal to >>date+2 (in this case 10 Jul 2002) execute my commands trought system.I >>thought to do thi

RE: Date

2002-07-12 Thread Anders Holm
> I need to do a Perl script who do a certain command after 2 days.Example: > my file contains > > 8 Jul 2002 > > when I lunch the script it must control the date and if it's equal to > date+2 (in this case 10 Jul 2002) execute my commands trought system.I > thought to do this transforming the dat

Re: Date

2002-07-12 Thread Carson Wilcox
I don't know if this will help, but in: ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime (time); $yday will give you the number of days since the beginning of the year. Carson -- Original Message -- From: Francesco Guglielmo <[EMAIL PR

Date

2002-07-12 Thread Francesco Guglielmo
I need to do a Perl script who do a certain command after 2 days.Example: my file contains 8 Jul 2002 when I lunch the script it must control the date and if it's equal to date+2 (in this case 10 Jul 2002) execute my commands trought system.I thought to do this transforming the date in this fo

Re: DBF File

2002-07-12 Thread Jenda Krynicky
> Hi, > > Anyone knows if PERL can talk to a .dbf file that is sitting on the > same machine where PERL is installed? See perldoc DBD::XBase and perldoc DBD::ODBC If you do not have these modules, install DBI. Jenda === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ===

format

2002-07-12 Thread Javeed SAR
Hi all, when i execute the command given below: $cmd = `blrk2254d\\post\\postie\\postie.exe -host:$SMTP_SERVER -to:SAR.Javeed\@sisl.co.in -cc:@EMAIL_TO_LIST1 -from:$ENV{'CLEARCASE_USER'}\@sisl.co.in -s:\"$SUBJECT\" -msg:\"$file is added to clearcase by $user \",\"time is :$date \",\" the o

disable printing an output of a perl script file

2002-07-12 Thread FLAHERTY, JIM-CONT
I have a quiz program, the script queries the DB and print to the browser a test for the student to take. I would like to prevent them from printing that test. All my clients are IE 6.0 Thanks Jim

: VIM: How do you place abbreviations in permanent memory?

2002-07-12 Thread Jackson, Harry
> -Original Message- > From: LRZ [mailto:[EMAIL PROTECTED]] > Sent: 12 July 2002 00:53 > To: [EMAIL PROTECTED] > Subject: : VIM: How do you place abbreviations in permanent memory? > > > I created the abbreviation foo to represent > #!/usr/bin/perl. It works if I hit any non character

Re: fastest regexp: split or (.*)?

2002-07-12 Thread Paul Tremblay
On Thu, Jul 11, 2002 at 09:17:18PM -0700, drieux wrote: > http://www.wetware.com/drieux/pbl/Other/BenchMarks/split_v.re_for_RTF.txt > > Thanks. It appears splitting is quickest. What is bizzare about your link is that the code appear *almost identical* to what I had written. I mean, I asked a