Help for this page

Select Code to Download


  1. or download this
    BEGIN { *basename = shortcutted { s!.*/!! for @_ }; }
    
    ...
        # note how $_ still contains the full pathname
        # ...
    }
    
  2. or download this
    sub shortcutted(&) {
        my $sub = shift;
    ...
            return $nondestructive ? @byval[ 0 .. $#byval ] : ();
        };
    }
    
  3. or download this
    use Test::More;
    
    ...
        is_deeply( \@res,  \@modified, '...returned correctly' );
        BEGIN { $num_tests += 2 }
    }