in reply to Re: subs && typeglobs
in thread subs && typeglobs
doesn't do what I expected?!#!/usr/bin/perl -w # ## use strict; my $Spath='/home/s0ttlen/'; opendir(H, "$Spath")|| die "Error:$!\n"; dir_search(*H,"$Spath"); sub dir_search{ local(*ROOT)=$_[0]; my $path=$_[1]; my $cont; foreach $cont (sort readdir(ROOT)){ next if $cont eq '.' or $cont eq '..'; next if -l "$path$cont"; if (-f "$path$cont"){ &log("$path$cont") if (-T "$path$cont" || -u "$path$cont"); } elsif (-d "$path$cont" && opendir(D,"$path$cont")) { dir_search(*D,"$path$cont"); } } } sub log{ my $file=$_[0]; my $log='/home/s0ttlen/log/slog'; open(LOG,">>$log")|| die "Error:$!\n"; print LOG "$file\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: subs && typeglobs
by tachyon (Chancellor) on Aug 04, 2001 at 00:23 UTC | |
by s0ttle (Scribe) on Aug 04, 2001 at 13:44 UTC | |
by tachyon (Chancellor) on Aug 04, 2001 at 14:49 UTC | |
by s0ttle (Scribe) on Aug 04, 2001 at 15:41 UTC |