Help for this page

Select Code to Download


  1. or download this
    my $foo = " bar";
    if($foo =~ /\S/) {
      print "Whitespace only\n";
    }
    
  2. or download this
    my $foo = " bar";
    if($foo =~ /^\s+$/) {
      print "Whitespace only\n";
    }