Hi,
I'm new here so hopefully i'm posting this in the right forum! I'm pretty new to perl also so this question is probably straight forward for most of ye!
Basically i'm writing a script to poll a directory and get a list of the files, this part is ok! I have been reading the files into an array (not sure if this is the best way to do this for what i am trying to achieve). Once i have the list i then need to compare all the files and search for file pairs that have the same name but have different suffix, for example
file.txt
file.tmp
Does anyone know a nifty way to compare array elements to achieve this? I have been attempting to use sort but am having little joy!
Cheers!
I'm new here so hopefully i'm posting this in the right forum! I'm pretty new to perl also so this question is probably straight forward for most of ye!
Basically i'm writing a script to poll a directory and get a list of the files, this part is ok! I have been reading the files into an array (not sure if this is the best way to do this for what i am trying to achieve). Once i have the list i then need to compare all the files and search for file pairs that have the same name but have different suffix, for example
file.txt
file.tmp
Does anyone know a nifty way to compare array elements to achieve this? I have been attempting to use sort but am having little joy!
Cheers!