Randal's columns (was Re: HOWTO: File Renaming and Directory Recursion)

2004-04-02 Thread Randal L. Schwartz
Morbus == Morbus Iff [EMAIL PROTECTED] writes: Morbus The script was mindlessly simple, and I felt it would be a good HOWTO Morbus for the perl beginners crowd, if not to show some good code practices, Morbus but also to counteract the . .. .. . controversial HOWTO that had Morbus been posted a

HOWTO: File Renaming and Directory Recursion

2004-04-01 Thread Morbus Iff
Earlier this morning, a friend of mine asked me for a script that would given a list of files, replace underscores with spaces, to take this: Artist_Name-Track_Name.mp3 and rename it to this: Artist Name-Track Name.mp3 The script was mindlessly simple, and I felt it would be a good HOWTO

Re: HOWTO: File Renaming and Directory Recursion

2004-04-01 Thread Paul Johnson
On Thu, Apr 01, 2004 at 07:05:51PM -0500, Morbus Iff wrote: Earlier this morning, a friend of mine asked me for a script that would given a list of files, replace underscores with spaces, to take this: Artist_Name-Track_Name.mp3 and rename it to this: Artist Name-Track Name.mp3

Re: HOWTO: File Renaming and Directory Recursion

2004-04-01 Thread Randy W. Sims
On 4/1/2004 7:05 PM, Morbus Iff wrote: # and here is that subroutine. it's nearly exactly # the same as our previous code, only this time, we # move into the directory that contains a file to # be renamed. this is actually a quick hack because # I knew this wouldn't be production-code: a

Re: HOWTO: File Renaming and Directory Recursion

2004-04-01 Thread Morbus Iff
while (@files) { Are you sure that's not: for (@files) { Yup, for is right. An error in my memory recall. -- Morbus Iff ( evil is my sour flavor ) Technical: http://www.oreillynet.com/pub/au/779 Culture: http://www.disobey.com/ and http://www.gamegrene.com/ icq: 2927491 / aim: akaMorbus