This does not work though. The backticks method of assigning program outputs to variables works for hostname but not for source. What am I doing wrong?$hostname = `hostname`; print "hostname is $hostname\n"; $source = `ypcat hosts | grep '$hostname$'`; $source =~ /\d+\.\d+\.\d+\.\d/; print "source is $source\n";
In reply to ip address get problem by markd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |