Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    $txt =~ s/test/$foobar/;
    
    print "$txt\n";
    
  2. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    $txt =~ s/test/$foo$fix/;
    
    print "$txt\n";
    
  3. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    
    my $txt = '1,2';
    $txt =~ s/(\d+)\.(\d+)/$10,$2/;
    
  4. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    $txt =~ s/(\d+)\.(\d+)/$1$fix,$2/;
    
    print "$txt\n";