Help for this page

Select Code to Download


  1. or download this
    my @test_cases = (
        ['cat.1', 'cat(1)'],
    ...
        my $transformed = $string =~ s/\.(\d+)$/($1)/r;
        print "[$string] --> [$transformed] wanted: [$want]. Success: ", (
    +$transformed eq $want ? "yes\n" : "no\n");
    }
    
  2. or download this
    [cat.1] --> [cat(1)] wanted: [cat(1)]. Success: yes
    [ld.so.conf.5] --> [ld.so.conf(5)] wanted: [ld.so.conf(5)]. Success: y
    +es