Hi i am a newbie to perl..
I have a script which copies files from local machine to a remote machine. I am using Getopt::Long to get the command line arguments.
"-d" : for directories
"-f" : for files
doubt #1
GetOptions ('d:s' => \@dir, 'f:s' => \@fil);
If i use this i am able to pass values like this - ./my_script.pl -d /home -d /etc
But i am not able to pass multiple values in a shot like - ./my_script.pl -d /home /etc
doubt#2
GetOptions ('d:s{,}' => \@dir, 'f:s{,}' => \@fil);
This is not even compiling and it says..
Error in option spec: "d:s{,}
Error in option spec: "f:s{,}
doubt#3
How to add one more option to rename directories..This Option should be enabled only if "-d" is specified.
"-r" : rename (only if directory)
Please guide me.