in reply to (jeffa) Re: Apache IP-Autoupdater
in thread Apache IP-Autoupdater

How about this?
@ARGV = ('httpd.conf'); while (<>) { print("Line = $.\nName = $1\n"), last if /^ServerName\s+(\S+)\s*$/; }
This could be reduced to a one-liner:
% perl -ne 'print("Line=$.\nName=$1\n"), last if /^ServerName\s+(\ +S+)\s*$/;' httpd.conf
Bit long though.