Help for this page

Select Code to Download


  1. or download this
    my $str = 'hello world';
    
    $str =~ /^(\S+)\s/;
    
    print $1;
    
  2. or download this
    my $str = 'hello world';
    
    my ($match) = $str =~ /^(\S+)\s/;
    
    print $match;