I have a directory of files that I need to rename by splitting the first and second halves of the filenames using the delimiter "-O" and then renaming with the second half first, followed by two underscores and then the first half. For example, natfinal1995annvol1_14.pdf -O filenum-20639 will be renamed to: filenum-20639__natfinal1995annvol1_14.pdf. There is always a -O in the filenames. I'm a newbie to Perl, but it looks like the way to go.
Thanks.