Re: A different kind of Sort...

2003-03-21 Thread Alan Dickey
"Haimov, Eugene" wrote: > ... > > P.S. Like I said in the original post, after failing to use sort(), > I used my own algorithm to generate the dependency, so the task > is kind of complete. I was just wondering whether there is still a > way to use sort() for this. I guess you'd have to call yo

Re: A different kind of Sort...

2003-03-21 Thread Alan Dickey
"Haimov, Eugene" wrote: > ... > > To give you more insight, here is the original task: > > There is an HTML page with a lot of textboxes (hundreds!). The textboxes > contain numbers, and when the user changes these numbers - the numbers in > other textboxes are supposed to change by some calculat

Re: A different kind of Sort...

2003-03-21 Thread Alan Dickey
"Haimov, Eugene" wrote: > > While on the topic of sorts, I would like to throw > in another challenge that I had faced recently, killed > a day trying to use sort() to do that, are "resorted" > to a regular home-grown solution. > Maybe you can point to what I was doing wrong... > > The task: > I

Re: file management(newbie question)

2003-01-17 Thread Alan Dickey
ebudihar wrote: > > Dear all, > I am sorry bugging you guys again. > I got a perl file and data file. When I tried to run it through IE, it does > not display the contents of the data file instead of it open the perl script > file itself in notepad. > Please help me how I can read my data file by

Re: Grep in Perl

2002-12-18 Thread Alan Dickey
"King, Jason G" wrote: > > Alan writes.. > > >"Kenneth Jideofor [ MTN - Ikoyi ]" wrote: > >> > >> Hi folks, > >> > >> I have two files, FILE1 and FILE2. Each of the two files is an array > >> of numbers. I want to check for the occurrence of each element of > >> FILE1 in FILE2. In other words, FI

Re: Grep in Perl

2002-12-18 Thread Alan Dickey
"Kenneth Jideofor [ MTN - Ikoyi ]" wrote: > > Hi folks, > > I have two files, FILE1 and FILE2. Each of the two files is an array of > numbers. I want to check for the occurrence of each element of FILE1 in > FILE2. In other words, FILE2 is checked for the occurrence of each of the > elements in

Re: Improving program speed

2002-11-20 Thread Alan Dickey
Mohammed Khatib wrote: > > Hi Gurus, > > I developed an XML to Folio flat file converter some time ago which we use > once a week here, and I would like to enhance the speed of the program. > > The program does a lot of work, but it can take up to 3 hours to process a > 5mb XML file, i.e. conver

Re: Getting the first line from a file

2002-11-11 Thread Alan Dickey
Philip Morley wrote: > > Is there a better way of getting the first line from a file than this, if > so how: > > open (FILE, "somefile.txt"); > my $Counter = 1; > while () > { > chomp; > if ($Counter == 1) > { > $Line1 = $_; > } > $Counter++; > } > > This method will read the entir