You need to pass the -archive
parameter into the call to new()
otherwise how will $rar_obj
know which file it is supposed to be looking at?
I can't seem to be able to install unrar
That's not a particular good explanation of your problem. What did you try? What unexpected behaviour did you see?
From the tags on your question, it looks like you're running Debian. What do you see if you run sudo apt-get install unrar
?
Update: My first comment was based on the code extract that you showed us. Looking at the full program code, I can see that %rar_conf
has other values set in it (including the -archive
option) before the section of code you gave us.
Looking at the source of the Archive::Rar module, it seems to assume that the program to use for dealing with the archives is called rar
. So 7-Zip is not going to work.