Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to mount remote server partition to put backup. I already have th perl script to take backup of data. I trying to add the mount command in the script. The below is the script, Please guide me how to do it.

If I run it on console it works and as well as with bash script. If I run this with perl its show mount error.

system ("mount -t cifs //\ folders /mnt/Backup/ -o,password=12345@0312");
share|improve this question
up vote 3 down vote accepted

You need either to escape the backslash using \\ and @ using \@ (in this specific case, no need to escape the @ as it is followed by a digit. If it is followed by a letter, it will be considered as array).

system ("mount -t cifs //\\ folders /mnt/Backup/ -o,password=12345\@0312");

, or use single quotes:

system ('mount -t cifs //\ folders /mnt/Backup/ -o,password=12345@0312');
share|improve this answer
I tried with second one, It worked. Thanks ton buddy. :-) – Caterpillar Mar 28 '12 at 8:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.