in reply to Re: Everybody loves not using File::Find
in thread Everybody loves not using File::Find

++pg for headspin value ! This code does run on linux , a small mod to &wanted to make it symlink safe(r)

if (($_ ne ".") && ($_ ne "..") && (! -l $_)) {

However when the hash is unrolled, the first key is null, and keys are generated all the way down to the actual search base.

eg: running this script on /usr/local/html/users/me returns VAR1='' => { 'usr'=> { 'local' => { 'html' => { 'me' => { etc,etc. Before the real search begins.

So to accomodate for that we can change the assignment to @elements

@elements = split("/" , substr($File::Find::name, length($ARGV[0])));
Obviously that shift @ARGV had to be replaced with $ARGV[0] , which might be better done assigning to a (heaven forefend) global.

'b'x2 || ! 'b'x2