Help for this page

Select Code to Download


  1. or download this
    # 1A. not very anal, but more concise
    for my $dir (glob "*") {
        # for a brief moment, $dir might not hold a directory's name
        next unless -d $dir; 
        ...
    }
    
  2. or download this
    # 1B. more "correct", with additional related variable
    for my $dir0 (glob "*") {
        # a "0" suffix is my convention for variables that contain an unpr
    +ocessed value 
    ...
        my $dir = $dir0;
        ...
    }
    
  3. or download this
    # 1C. more "correct", with additional variable and concept
    for my $entry (glob "*") {
        next unless -d $entry;
        my $dir = $entry;
        ...
    }
    
  4. or download this
    # 2A. not very anal
    sub load {
    ...
        }
        ...
    }
    
  5. or download this
    # 2B.
    sub load {
    ...
        }
        ...
    }