http://qs321.pair.com?node_id=521466

Angharad has asked for the wisdom of the Perl Monks concerning the following question:

Hi there
I have a perl script that creates a particular file. However, depending on the eventual users of the script, sometimes the filename might look like this
1bn9.en.cnt
And other times like this
1bn9.pd.cnt
I want to circum-navigate this problem by renaming the file as follows
1bn9.cnt
before processing it further
I've tried a simple mv command
mv 1bn9.*.cnt 1bn9.cnt
But that complains about their being multiple files and therefore the destination having to be a directory, which is not what I want at all.
Can anyone suggest a solution ... be it Perl or a Unix command? It would be much appreciated.