Help for this page

Select Code to Download


  1. or download this
    my $var = "foo bar";
    my @vals = split ' ', $var; # if you need something more complex, use 
    +a regex for the pattern
    
  2. or download this
    foreach my $val (@vals) {
      print "Numeric\n" if $val =~ /^[0-9]{2}/;
    }