Subj : perl files for fidonet To : Jame Clay From : tony summerfelt Date : Fri May 18 2001 07:32 am # On Fri, May 18/01 at 06:43 AM, Jame Clay wrote to Tony Summerfelt: JC> And Tony, if you do have another archive of fidonet related perl JC> programs I would certainly be interested getting a copy... i have a raw nodelist reader, i use watching the dying beast that is fidonet. the 'robot' directory, is where i have changing text files that are posted by robots on the bbs (rules, bbs stats sent to me in netmail, etc.): $nodedir = '/max/nodelist'; $robotdir = '/max/robot'; $pvt=$hold=$down=$count=0; &stats; print "$firstline\n"; write robot; print robot "\n\n"; close(nodelist); close(robot); sub stats { opendir(dir,$nodedir); @nodelist = grep(/nodelist\..*/, readdir(dir)); closedir(dir); ($nodelist) = grep(/\.\d/,@nodelist); undef @nodelist; open( nodelist,"$nodedir/$nodelist") || die "$nodedir/$nodelist not found -- $!\n"; open(robot,">>$robotdir/z1stats.txt") || die "can't open $robotdir/z1stats - $!\n"; print "\nbuilding z1stats for $nodelist\n\n"; $firstline=; while () { undef($node); undef($entry); next if /^;/; $zone =$2 if /(^Zone,)(\d+)/; last if $zone==2; $node =$2 if /(^,)(\d+)/o || /(^Hub,)(\d+)/o; $net =$2 if /(^Host,)(\d+)/o || /(^Zone,)(\d+)/o || /(^Region,)(\d+)/o; $entry=$zone.":".$net."/".$node if defined($node); $count++ if defined($entry); $pvt++ if /(^Pvt,)(\d+)/o; $hold++ if /(^Hold,)(\d+)/o; $down++ if /(^Down,)(\d+)/o; } $total=$count+$pvt+$hold+$down; } format robot= @<<<< -- zone 1 live nodes $count @<<<< -- pvt nodes $pvt @<<<< -- nodes on hold $hold @<<<< -- down nodes $down @<<<< -- total zone 1 nodes $total .. ..t .... telnet://ventedspleen.dyndns.org --- GoldED/SuSE 3.0.1-os1+ * Origin: ...the vented spleen - kingston, on (613) 544-9332 (1:249/139) .