Help for this page

Select Code to Download


  1. or download this
    $string = "This is a test\nMore Test"; 
    $len++ for ($string =~ /./sg);
    print $len;
    
  2. or download this
    $_ = "This is a test\nMore Test";
    $len = (split //);
    print $len;
    
  3. or download this
    $string = "This is a test\nMore Test";
    $len = (grep /./s, (@chars = split //, $string));