Re: Check for duplicate entires

2003-04-03 Thread Mike Blezien
Well after some serious head scratching and a few trial&error runs, I was finally able to get the results we needed. Appreciate the list's help ;) >> R. Joseph Newton wrote: Mike Blezien wrote: Hello all, working on creating a category/sub category data file, somthing like this: Animations

Re: Check for duplicate entires

2003-04-03 Thread R. Joseph Newton
Mike Blezien wrote: > Hello all, > > working on creating a category/sub category data file, somthing like this: > > Animations::Mini::3D-Miscellaneous > Clip_Art::People-Stick_People::Business::Household-Furniture > Icons::BMP-Computers::32x32icons-Computers > > the first field in each line is the

RE: Check for duplicate entires

2003-04-03 Thread Chris Rogers
There are many ways to do this but one comes to mind that may shorten the code as well as speed things up just a little (REGEX's are usually very efficient). Try this out: sub update_categories { my($maincat,$subcat) = @_; my $process = 0; my @scats= (); $subcat =~ s!(.*?

Re: Check for duplicate entires

2003-04-03 Thread david
Mike Blezien wrote: > David, > > Not quiet... but appreciate the feedback... it did give an idea to another > more easier approach to the process and it seems to be working,... so far. > > thanks, > great. just curious, which portion is the "Not quiet" referring to? :-) david -- To unsubsc

Re: Check for duplicate entires

2003-04-03 Thread Mike Blezien
David, Not quiet... but appreciate the feedback... it did give an idea to another more easier approach to the process and it seems to be working,... so far. thanks, >> david wrote: David wrote: does the following do what you want: sub update_categories{ my $data_files = shift;

Re: Check for duplicate entires

2003-04-03 Thread david
David wrote: > > does the following do what you want: > > sub update_categories{ > my $data_files = shift; > my $main_cat = shift; > my $sub_cat= shift; > open(CAT,$data_files) || die $!; > while(){ > close(CAT) and return if(/$main_c

Re: Check for duplicate entires

2003-04-03 Thread david
Mike Blezien wrote: > Hello all, > > working on creating a category/sub category data file, somthing like this: > > Animations::Mini::3D-Miscellaneous > Clip_Art::People-Stick_People::Business::Household-Furniture > Icons::BMP-Computers::32x32icons-Computers > > the first field in each line is