Hi everyone, I am having a small problem with opendir:
#!/usr/bin/perl -w # getting disk usage for users # not quite as good as du(1) but alittle faster...maybe # written by [EMAIL PROTECTED] # Aug 17, 2002 use strict; use diagnostics; $|++; my ( $name, $uid, $dir ); while ( ( $name, undef, $uid, undef, undef, undef, undef, $dir ) = getpwent()) { next if ( $name =~ /users/ || $name =~ /www/ || $name =~ /sysop/); if ( $uid > 500 ) { if (-l $dir ) { $dir = "/home2/$name"}; my $maildir = "$dir/\*\-mail/"; print "$name has $dir and $maildir\n"; opendir( MAILDIR, "$maildir" ) || die "what the: $!"; my @mail = grep -T, readdir MAILDIR; closedir MAILDIR; print "@mail\n"; } } This code dies on the opendir statemenet saying that /home/$name/*-mail is not there. But it is there. What else can I use for the "*" so that it will read the mail direcotry for a user? Thanks for the help, --chad -- chad kellerman <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part