Well, if You use the shell You are working in, from the command line or in a script, You are using less resources than You would do if You invoke an external program. You are using functions that are "already there". It's not very important in day to day work if a job takes 10 seconds instead of 2. The trade-off comes into play when You are dealing with very large amounts of data. Perl can be very efficient but if You are only traversing Your home directory for renaming dgn-files, it is probably much easier to just use what You already have. Portability and complexity are other considerations.
Your example could be expressed in a shell (this works for bash on the command line) as:
Code:
for x in *.dng;do mv $x ${x:2};done
meaning, for each file that matches the pattern *.dng, rename it to the same name but cut out the first two characters, or rather, start at character index 2. The index starts from 0, so Your file 3p2325294.dgn would be renamed to 2325294.dgn
I think that once You get used to the shell You realise the power of it. There are so many examples of piping stuff through sed and awk and perl, when the answer is already at Your fingertips. I've done it myself a lot. It may be easier because You know how sed works so You go for it instead of exploring the shell equivalent.
And I'm not entirely sure about how it would be written in Perl, I'm a bit rusty in that department...
/Lakris