in reply to Re: Probably silly regex question / not so silly regex question
in thread Probably silly regex question / not so silly regex question
Ah, thank you (for your second point); that finaly clears it up. (All the other answers didn't parse the question as I meant it.)
As for the second part, since all these files have a name of the form a-z+-0-9+a-z0-9-*.jpg, so I just used a simple split /\./. (They're all jpegs now, but that might change; I wanted it to be at least a little more generic.) Your point is, of course, well taken, though there's probably a large problem space where you do know that there is an extention.
Thanks also to all the other people that had solutions to the $id.$ext problem as well; your answers were almost all enlightening.
I still wonder which is more efficent. I'll probably do some benchmarking at some later point.
Thanks, James Mastros, Just Another Perlmonks Neonate
|
|---|