Re: sorting AoA [was the subject]

2004-03-27 Thread R. Joseph Newton
WC -Sx- Jones wrote: > John W. Krahn wrote: > >>replying) so James can take ownership of those parts of > >>this thread. > > > > > > Not under most country's copyright laws he can't. :-( > > LOL :) > > I'd like to see that erroneous verbage - as words, > expressed as thoughts and ideas in the di

Re: sorting AoA

2004-03-27 Thread R. Joseph Newton
"N, Guruguhan (GEAE, Foreign National, EACOE)" wrote: > [Implementation stuff snipped] > > Can some one tell me how do I this? Well, if you tellus what you want as output, we could maybe start. Hint--if you really have production code with variable names like @array1, @array2, etc., the best

Re: sorting AoA

2004-03-27 Thread WC -Sx- Jones
John W. Krahn wrote: replying) so James can take ownership of those parts of this thread. Not under most country's copyright laws he can't. :-( LOL :) I'd like to see that erroneous verbage - as words, expressed as thoughts and ideas in the discourse of conversation (whether spoken or writte

Re: sorting AoA

2004-03-27 Thread John W. Krahn
Wc -Sx- Jones wrote: > > John W. Krahn wrote: > > Wc -Sx- Jones wrote: > > > >>James Edward Gray II wrote: > >> > >>if (-s $output_file) { > > > > Why are you attributing to James what Guruguhan wrote? > > :) > > I'm not -- however that statement was promoted into the > portion of the th

Re: sorting AoA

2004-03-27 Thread WC -Sx- Jones
John W. Krahn wrote: Wc -Sx- Jones wrote: James Edward Gray II wrote: if (-s $output_file) { Why are you attributing to James what Guruguhan wrote? :) I'm not -- however that statement was promoted into the portion of the thread that James asked about (which I was replying) so James can tak

Re: sorting AoA

2004-03-27 Thread John W. Krahn
Wc -Sx- Jones wrote: > > James Edward Gray II wrote: > if (-s $output_file) { Why are you attributing to James what Guruguhan wrote? > There are other reasons to test for a file size prior to opening it :) > > Why open a data file if it is zero length when you expect data? What if "-s

Re: sorting AoA

2004-03-26 Thread WC -Sx- Jones
James Edward Gray II wrote: if (-s $output_file) { :) There are other reasons to test for a file size prior to opening it :) Why open a data file if it is zero length when you expect data? -- _Sx_ http://youve-reached-the.endoftheinternet.org/ _ perldoc -qa.a | perl -lpe '($_)=m("(.*)")'

Re: sorting AoA

2004-03-26 Thread James Edward Gray II
On Mar 26, 2004, at 6:06 PM, WC -Sx- Jones wrote: if (-s $output_file) { You shouldn't use file test operators to determine whether or nor to open files as there is no guarantee that the test will be valid by the time you open the file. File tests should be done AFTER you obtain a RW lock.

Re: sorting AoA

2004-03-26 Thread WC -Sx- Jones
if (-s $output_file) { You shouldn't use file test operators to determine whether or nor to open files as there is no guarantee that the test will be valid by the time you open the file. File tests should be done AFTER you obtain a RW lock. This is *supposed* to prevent other system processe

Re: sorting AoA

2004-03-26 Thread John W. Krahn
Guruguhan N wrote: > > Hi John, Hello, > Thanks for the quick help. I have resolved the problem > with your suggestions. But now I am facing a new problem. Actually > the goal is to get the statistics for each of the data column stored > in a file (FilterMC_3bar_data.out). This file

Re: sorting AoA

2004-03-26 Thread John W. Krahn
Guruguhan N wrote: > > Hi , Hello, > I have an array that is build like this > foreach $i ( 0 .. @array1-1) { > foreach $j ( 0 .. @array2-1) { > $array3[$i][$j] = $array2[$j]; > } > } You can use an array slice to do that: @array3[ 0 .. $#array1 ] = map [ @array2 ], 0 .

Re: sorting AoA

2004-03-26 Thread Rob Dixon
Guruguhan N wrote: > > I have an array that is build like this > foreach $i ( 0 .. @array1-1) { > foreach $j ( 0 .. @array2-1) { > $array3[$i][$j] = $array2[$j]; > } > } > The array3 has "m" rows and "n" columns of data. > > This code is written by some one else and I am trying to get the statistic

sorting AoA

2004-03-26 Thread N, Guruguhan \(GEAE, Foreign National, EACOE\)
Hi , I have an array that is build like this foreach $i ( 0 .. @array1-1) { foreach $j ( 0 .. @array2-1) { $array3[$i][$j] = $array2[$j]; } } The array3 has "m" rows and "n" columns of data. This code is written by some one else and I am trying to get the st