Help for this page

Select Code to Download


  1. or download this
    # This works fine
    $a = "abc";
    ...
    # "Use of uninitialized value in concatenation (.)
    $b = "c";
    $b =~ s/^(?:a(\w))?(\w)$/$1:$2/;
    
  2. or download this
    $b =~ s/^a?(\w?)(\w)$/$1:$2/; # no warning here.