Help for this page

Select Code to Download


  1. or download this
    use File::Spec;
    my $goners = 3; # how many?
    ...
    my @dirs   = File::Spec->splitdir($str);
    splice @dirs, 0, $goners;
    print File::Spec->catdir(@dirs);