Re: Comparing two files of 8million lines/rows ...

2006-08-16 Thread Mumia W.
On 08/16/2006 04:35 PM, [EMAIL PROTECTED] wrote: Hi all, I have two database tables, one is local and one is on a WAN. They are supposed to be in-sync but they at the moment, they are not. There are 8million+ plus rows on this table. I tried to do SELECT EMPNO FROM EMP WHERE EMPNO NOT IN ( SELE

Re: Recursive Copy

2006-08-16 Thread John W. Krahn
John W. Krahn wrote: > > UNTESTED: > > use File::Copy; > use File::Basename; > use File::Find; > > my $from_dir = 'A'; > my $to_dir = 'F'; > > my %count; > find sub { > my ( $name, undef, $ext ) = fileparse $_, qr/\..*/; > copy( $_, "$to_dir/$name" . ++$count{ $name } . $ext ) Perhap

Re: Recursive Copy

2006-08-16 Thread John W. Krahn
Steve Jardine wrote: > Hiya all, Hello, > Here's a sceneraio: > > > I have a directory tree: > > A- > |->B > |->C > -->D- >->E > > > In this directory tree I have possibly several same named files > in different directories. What I want to do is to recursively > copy all

Re: Comparing two files of 8million lines/rows ...

2006-08-16 Thread joseph
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, Hello, > > I have two database tables, one is local and one is on a WAN. They are > supposed > to be in-sync but they at the moment, they are not. There are 8million+ > plus > rows on this table. > > I tried to do SELECT EM

RE: match an array element

2006-08-16 Thread Smith, Derek
-Original Message- From: Adriano Allora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 1:21 PM To: beginners@perl.org Subject: match an array element hi all, I need to match any array element in a list of files. More precisely I'd to extract the $. for each match recording

Comparing two files of 8million lines/rows ...

2006-08-16 Thread benbart
Hi all, I have two database tables, one is local and one is on a WAN. They are supposed to be in-sync but they at the moment, they are not. There are 8million+ plus rows on this table. I tried to do SELECT EMPNO FROM EMP WHERE EMPNO NOT IN ( SELECT EMPNO FROM [EMAIL PROTECTED] ), leave that runni

RE: Recursive Copy

2006-08-16 Thread Timothy Johnson
Check out the File::Find. You can use it to recursively find and copy all of the files. If you want to manipulate the files based on pathname or filename, also check out File::Basename. Both should already be on your computer. -Original Message- From: Steve Jardine [mailto:[EMAIL PROTEC

Recursive Copy

2006-08-16 Thread Steve Jardine
Hiya all, Here's a sceneraio: I have a directory tree: A- |->B |->C -->D- ->E In this directory tree I have possibly several same named files in different directories. What I want to do is to recursively copy all the files in th

Re: Coverting a big flat file

2006-08-16 Thread Dr.Ruud
Saravana Kumar schreef: > Since it is creating > a new file i was wondering whether i can do the changes in the same > file ie., read 1000 characters, do the replacement and write the > output to the same file. This will reduce the disk space used(since > the file i have is 100G). Just change you

RE: Vertically aligning textfields when using CGI

2006-08-16 Thread Charles K. Clarkson
Nath, Alok (STSD) wrote: : I am generating a simple form which generates different : textfields and scrolling list in different rows. When I display : the form what I see is, the different textfields and scrolling : list are not aligned vertically. I want the textfields and : scrolling list to sta

Re: Coverting a big flat file

2006-08-16 Thread John W. Krahn
Saravana Kumar wrote: > John W. Krahn wrote: > >>You can do what you want if you set the Input Record Separator to read >>1000 bytes at a time: >> >>$/ = \1000; >>while ( ) { >>s/[[:cntrl:]]/ /g; >>print "$_\n"; >>} > > Thanks John. That did the trick. I ran the above script with my

Re: Handle date structured folders

2006-08-16 Thread John W. Krahn
John W. Krahn wrote: > Khairul Azmi wrote: >>On 6/23/06, John Ackley <[EMAIL PROTECTED]> wrote: >>>Khairul Azmi wrote: I have this problem. There is a script that stores log files into folders that follows structure of the following /MM/DD eg.. /var/log/projec

Re: match an array element

2006-08-16 Thread John W. Krahn
Adriano Allora wrote: > hi all, Hello, > I need to match any array element in a list of files. More precisely I'd > to extract the $. for each match recording an hash element like this one: > > $matches{$filename} = $. > > Every file is a list of unique words, so I'm sure there will not be > pr

Re: match an array element

2006-08-16 Thread Rob Dixon
Adriano Allora wrote: > > I need to match any array element in a list of files. More precisely I'd > to extract the $. for each match recording an hash element like this one: > > $matches{$filename} = $. > > Every file is a list of unique words, so I'm sure there will not be > problems. > My actua

Re: Handle date structured folders

2006-08-16 Thread John W. Krahn
Khairul Azmi wrote: > > On 6/23/06, John Ackley <[EMAIL PROTECTED]> wrote: >> >> Khairul Azmi wrote: >> > I have this problem. There is a script that stores log files into >> > folders that follows structure of the following >> > >> > /MM/DD >> > >> > eg.. >> > >> > /var/log/projects/2006/06/2

match an array element

2006-08-16 Thread Adriano Allora
hi all, I need to match any array element in a list of files. More precisely I'd to extract the $. for each match recording an hash element like this one: $matches{$filename} = $. Every file is a list of unique words, so I'm sure there will not be problems. My actual solution sounds like:

RE: line command in perl

2006-08-16 Thread Timothy Johnson
I believe you want 'perldoc -f splice'. -f is for internal functions. -Original Message- From: chen li [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 9:31 AM To: beginners@perl.org Subject: line command in perl Dear all, I want to find the usage of a specific function su

line command in perl

2006-08-16 Thread chen li
Dear all, I want to find the usage of a specific function such as splice. Which line code am I supposed to issue? I tried perldoc splice or perldoc perlfunc splice but it didn't work. Thanks, Li __ Do You Yahoo!? Tired of spam? Yahoo! Mail has th

Re: handling upload variables in POST with LWP

2006-08-16 Thread Tom Phoenix
On 8/16/06, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: Following is the data of post that I have for a website. I need to post data using perl. use HTTP::Request::Common qw(POST); use LWP::UserAgent; You probably want WWW::Mechanize. You probably won't have to change your code much to use i

Re: Coverting a big flat file

2006-08-16 Thread Rob Dixon
Saravana Kumar wrote: > John W. Krahn wrote: > >>Saravana Kumar wrote: >> >>>I am new to the list and newbie in perl. >>> >>>I have a big flat file(100G). The file was supposed to be in a single >>>line but many of records(as it has ^M). There are also ^@ and tabs in >>>between. >>> >>>I want to f

Re: Vertically aligning textfields when using CGI

2006-08-16 Thread Rob Dixon
Nath, Alok (STSD) wrote: > Hi, > I am generating a simple form which generates different textfields and > scrolling list in different rows. When I display the form what I see is, the > different textfields and scrolling list are not aligned vertically. I want > the textfields and scrolling lis

Re: math module and array manipulation

2006-08-16 Thread chen li
--- David Greenberg <[EMAIL PROTECTED]> wrote: > I'm sure there's an easier/better way of doing this, > but in the interest of > simplicity, let's look at this approach: > > First, a red flag goes up when you say that you have > an array of 12 > numbers. Will it always be twelve? > > The seco

Re: Perl on Windows Server.

2006-08-16 Thread Xavier Noria
On Aug 16, 2006, at 2:54 PM, Xavier Noria wrote: On Aug 16, 2006, at 2:33 PM, Krishnakumar K P wrote: Hi, There is a problem in coding perl in windows and using it in linux. When you code in windows the file will contain dos/windows new line pairs instead of the Linux/UNIX single New Line ch

Re: Perl on Windows Server.

2006-08-16 Thread Xavier Noria
On Aug 16, 2006, at 2:33 PM, Krishnakumar K P wrote: Hi, There is a problem in coding perl in windows and using it in linux. When you code in windows the file will contain dos/windows new line pairs instead of the Linux/UNIX single New Line character which may cause error in linux server.

RE: Perl on Windows Server.

2006-08-16 Thread Krishnakumar K P
Hi, There is a problem in coding perl in windows and using it in linux. When you code in windows the file will contain dos/windows new line pairs instead of the Linux/UNIX single New Line character which may cause error in linux server. to fix this you should open the file in vi and type the follo

RE: Perl on Windows Server.

2006-08-16 Thread Ryan Frantz
> -Original Message- > From: Adilson P. de Souza [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 16, 2006 8:08 AM > To: beginners@perl.org > Subject: Perl on Windows Server. > > Hi All > > This is my first post at beginner list. I work with PHP/MySQL and now i > have to modify a apl

Perl on Windows Server.

2006-08-16 Thread Adilson P. de Souza
Hi All This is my first post at beginner list. I work with PHP/MySQL and now i have to modify a aplication that use perl together php. My remote server is Linux, but my machine of developtment is Win XP. Is possible to develop a system on Win and to publish at Linux Server? Thera is any proble

Vertically aligning textfields when using CGI

2006-08-16 Thread Nath, Alok (STSD)
Hi, I am generating a simple form which generates different textfields and scrolling list in different rows. When I display the form what I see is, the different textfields and scrolling list are not aligned vertically. I want the textfields and scrolling list

handling upload variables in POST with LWP

2006-08-16 Thread Saurabh Singhvi
Hi all, Following is the data of post that I have for a website. I need to post data using perl. I am able to handle the normal variable passsing, but I don't understand how to handle the values of upload boxes. I need them to be empty. Content-Type: multipart/form-data; boundary=--

Re: Coverting a big flat file

2006-08-16 Thread Saravana Kumar
John W. Krahn wrote: > Saravana Kumar wrote: >> Hi, > > Hello, > >> I am new to the list and newbie in perl. >> >> I have a big flat file(100G). The file was supposed to be in a single >> line but many of records(as it has ^M). There are also ^@ and tabs in >> between. >> >> I want to first re

Re: Handle date structured folders

2006-08-16 Thread Dr.Ruud
"Khairul Azmi" schreef: > Thanks for the code. However it does not works as expected. It should, because you stated that it will run once a day. Remove the older files (folders?) by hand, once? Or just put a loop around it: for my $days (2..14) { ... }. Further: don't top-post, and snip all n

Re: Handle date structured folders

2006-08-16 Thread Khairul Azmi
Thanks for the code. However it does not works as expected. My testing shows that the program will only unlink folders if the structure name of the folders falls exactly on the range. Say today is 16 August 2006. If I have only have this folder /var/log/project1/2006/08/08/8231.tgz The progra