sunadmn has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use File::Find; use FileHandle; my $base = "/chroot/named/master"; my $out = "/var/tmp/current_list"; find(\&wanted, $base); sub wanted { return unless ( -f "$File::Find::name" and $File::Find::name !~ m!/ +in-addr/! ); my $name = "$File::Find::name"; my $zone = new FileHandle "$name", "r"; my $out = join('.', ( split('/', $name) )[4..7]); print "$out\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Building scalar from File::Find
by demerphq (Chancellor) on Dec 29, 2003 at 19:45 UTC | |
Re: Building scalar from File::Find
by ysth (Canon) on Dec 30, 2003 at 03:37 UTC |