Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: more renaming! (mp3s)

by spm (Acolyte)
on Jul 18, 2001 at 14:13 UTC ( [id://97599] : note . print w/replies, xml ) Need Help??

in reply to more renaming! (mp3s)

You can always find all the files with globbing, like so:
foreach(<*.mp3>) { }
... might shorten up your code a bit. You could also, stat() each file and check its type, if it's a directory, decend into it and call the function again...

Replies are listed 'Best First'.
Re: Re: more renaming! (mp3s)
by strfry() (Monk) on Jul 19, 2001 at 19:30 UTC
    true, but i thought globbing required csh? some platforms (heck, i've seen some unices even) fail on that. readdir + grep seems to work universally... or at least, until they make a worse universe. (:

      but i thought globbing required csh?
      This is no longer true. Starting from perl 5.6.x the glob is performed internally.

      -- Hofmator

        hmm that would make sense. i was using 5.005 patch 3 i believe. at any rate, since playing with
        perl's grep, i now understand map much better now, so it's not a total loss.