if i try to run the script on Windows one it failsAnd the fqdn of that Windows host is just one single word, right? Try chomping it like this:
update: no, ([^.]+) won't dochomp(my $fqdn = `hostname`); # OR, much better: my ($hostname) = `hostname` =~ /([-a-zA-Z0-9]+)/; $hostname=~ tr/A-Z/a-z/;
In reply to Re: Perl - pattern matching
by hazylife
in thread Perl - pattern matching
by fabrizio_start_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |