Help for this page

Select Code to Download


  1. or download this
    $text =~ s/\$(\w+)/$$1 * 2/egx;  #I tried to double the age and succee
    +ded!
    
  2. or download this
    $AGE = 17;
    $tmpl = 'I am %s years old';      # note single quotes
    $text = sprintf $tmpl, $AGE * 2;  # print I am 17 years old