Elias, et al -- ...and then Elias Assmann said... % % On Sat, 8 Jun 2002, David T-G wrote: % % > % I can't modify $fullpath because I'll use it later, but for parsing I % > % don't need the leading "/mp3/" part, and the only way I've found to get ... % > While it may not be a perfect solution, I hit upon % > % > (undef,undef,@working) = # peel off /mp3 ... % > split(/\//,$fullpath) ; # ... as we split into pieces % > % > and find it much of an improvement. Further improvement is welcome :-) % % If you care only about "/mp3", why not just remove "/mp3"? Like so: % s'/mp3''; -- and then split happily away. But, of course, that would
I don't want to be back to two lines; it's a pride thing :-) % be two lines, so how about this: @working = m'/mp3(/[^/]+)+';? Let's see what this does here, because it might point to the right track. I'd love to be able to @working = split ( /\//, $fullname-without-/mp3/-on-it ) and so is there a way to spit out $fullname but suppress the ^/mp3/ part, remembering that we can't actually change $fullname in the process? % % Also, I think File::Basename might help you (perldoc -f, *hint hint* % :-). I'll check it out :-) Hmmm... I must be doing something wrong: [zero] [12:37pm] ~> perldoc -f File::Basename No documentation for perl function `File::Basename' found [zero] [12:37pm] ~> perldoc -f Basename No documentation for perl function `Basename' found [zero] [12:37pm] ~> perldoc -f File No documentation for perl function `File' found Of course, that assumes it's installed (even if it is supposed to be part of the base package), which I can't guarantee because I don't run or set up this system... Hokay, the camel book tells me a bit about it. I'm not sure how it will help me; I can get dirname out of it but that's the whole path, and I can get basename out of it but that's no biggie, and I don't see how it will pull /mp3/ off for me, and I don't need (well, yet) to worry about a suffix. Care to give more hints? :-) % % TMTOWTDI, There sure is! % % Elias Thanks & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg25714/pgp00000.pgp
Description: PGP signature