Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    use strict;
    ...
    $newname = $oldname;
    $newname =~ s/$oldpat/$newpat/e;
    print "variable patterns: $oldname becomes $newname\n";
    
  2. or download this
    static patterns: foo-64-bar becomes foo_64_bar
    variable patterns: foo-64-bar becomes foo_$1_bar