http://qs321.pair.com?node_id=179991

andrew has asked for the wisdom of the Perl Monks concerning the following question:

alright I have this:
finddir("$config{home}$user{site_id}"); sub finddir { my $root = shift; chomp ( $root ); $root = $root . '/' unless ( $root =~ m|/$| ); local *DIR; opendir ( DIR, $root ); my @userfiles = sort grep !/^\.\.?\z/, readdir DIR; foreach $file (@userfiles) { next unless ( -d "$root$file" ); print "$dir"; finddir("$root$file"); } }
Now when I tell it to print, I dont want it to print "$config{home}$user{site_id}$file". I just want it to print the file, so how can I take the $config{home}$user{site_id} out.