Help for this page

Select Code to Download


  1. or download this
    ~/perl/monks$ cat test_tilde.pl 
    #!/usr/bin/perl
    ...
    $test =~ s|example\.com|12\.23\.56\.78\/\~example|g;
    
    print $test, "\n";
    
  2. or download this
    ~/perl/monks$ ./test_tilde.pl 
    This is a test
    ...
    of a replacement 
    string, really (12.23.56.78/~example) 
    and truly.