I have a script that executes the following:
$grepcmd = "/bin/grep ";
$listserv is a list of servers
$details is the type of OS
The following line calls each:
my $list = `$grepcmd $listserv $details`;
My problem is that a few of the servers have a strange character in the name e.g. server 1 (houston).
It seems to be having trouble with the space or the bracket but the grep doesn't work for these clients.
How can I amend this in the script? Would double quotes around $listserv work?