AW: Regex to find group of image files

2004-02-19 Thread B. Fongo
I thought I could solve the regex issue a different way, but failed. My $path = "Mazda.1.jpg "; ($file, $dir, $ext) = fileparse ($path, '\..*' ); #I'm trying to get Mazda.2.jpg and Mazda.3.jpg. # $file contains Mazda, so why does this regex fail to deliver Mazda.2.jpg # and Mazda.3.jp? my @

Re: AW: Regex to find group of image files

2004-02-18 Thread R. Joseph Newton
"R. Joseph Newton" wrote: > Samll correction to the sample code. I started out using $pics as the name for the reference to the outer hash, and forgot to change one instance when I changed this to $views. > my $views = {}; > while () { >my @name_elements = split /\./; >$views->{$name_el

Re: AW: Regex to find group of image files

2004-02-18 Thread R. Joseph Newton
"B. Fongo" wrote: > I have several groups of files in a directory, like: > > Mazda.1.jpg, Mazda.2.jpg, Mazda.2.jpg > Toyota.1.jpg, Toyota.2.jpg, Toyota.3.jpg > Voyager.1.jpg, Voyager.2.jpg, Voyager.3.jpg > Etc. etc > > # First of, I'll get the list of all files. Jumping in too fast here, I would

AW: Regex to find group of image files

2004-02-18 Thread B. Fongo
I have several groups of files in a directory, like: Mazda.1.jpg, Mazda.2.jpg, Mazda.2.jpg Toyota.1.jpg, Toyota.2.jpg, Toyota.3.jpg Voyager.1.jpg, Voyager.2.jpg, Voyager.3.jpg Etc. etc # First of, I'll get the list of all files. my ($image, @bigger, @smaller); if (-d "images"){ opendir (I