Help for this page

Select Code to Download


  1. or download this
    my $base = 'C:\\fldr1\\fld2\\';
    $str =~ s/\@\@.*//s;
    $str =~ s/^\Q$base\E//;
    
  2. or download this
    use File::Spec::Functions qw( abs2rel );
    my $base = 'C:\\fldr1\\fld2';
    $str =~ s/\@\@.*//s;
    $str = abs2rel($str, $base);