#!/usr/bin/perl -w

use strict;

# A simple trap handler
my $TRAP_FILE = "/tmp/traps.test.log";

# my $host = <STDIN>;# Read the Hostname - First line of input from STDIN
# chomp($host);
# my $ip = <STDIN>;# Read the IP - Second line of input
# chomp($ip);

my (@vars);

while(<STDIN>) {
        chomp($_);
        push(@vars,$_);
}

open(TRAPFILE, ">> $TRAP_FILE");
# print(TRAPFILE "HOST: $host\nIP: $ip\n");
foreach(@vars) {
        print(TRAPFILE "$_\n");
}
print(TRAPFILE "\n----------\n");
close(TRAPFILE);

