Help for this page

Select Code to Download


  1. or download this
    sub get_content {
        my $n = shift;
    ...
        $content=~s{(?:^[\n\r]\s{4}|[\n\r]+\s{4})(.*)}{$1\n}gm;
        return $content;
    }
    
  2. or download this
    sub get_content {
        my $n = shift;
    ...
        my ($indent) = ($_[0] =~ /^([ \t]+)/);
        $_[0] =~ s/^$indent//gm;
    }