in reply to script hangs up when reading in file

That's not normal. What does this snippet do?

my $dhcpdconf = ''; open (DHCPDCONF, "dhcpd.conf") or die "Cannot read from file: $!"; while (<DHCPDCONF>) { $devices{lc($1)} = '' if (/#.*#.*#.*# Modem MAC: (\w+:\w+:\w+:\w+:\w+:\w+)/ or /subclass ".*" 1:(\w+:\w+:\w+:\w+:\w+:\w+)/); $dhcpdconf .= $_; } print "--\n$dhcpdconf\n--\n";

Replies are listed 'Best First'.
Re: Re: script hangs up when reading in file
by tombmbdil (Beadle) on Jan 16, 2003 at 23:56 UTC
    Thanks for your reply... that snippet works just fine as a standalone script, but when incorporated into the existing code it hangs at the same spot.

    I should also add that I have tried this on two different machines with the same results.