#!/opt/OV/contrib/perl/bin/perl #Set my variables my $in_file = $ARGV[0]; #my $in_file = 'configuration_logfile_weblogic'; open my $in_fh, '<', $in_file or die "Could not open file $in_file: $! +"; my $fqdn = `hostname`; @hostname_short = split(/\./,$fqdn,2); my $hostname = "@hostname_short[0]"; $hostname=~ tr/A-Z/a-z/; while ( my $line = <$in_fh> ) { if($line =~ m/^$hostname;;(.*);;/) { print $1; } } close $in_fh or die "Could not close file $in_file: $!";