Help for this page

Select Code to Download


  1. or download this
    if (my @match = split /\s+/) {
        if ($match[-2] =~ /^\d{1,3}$/ and $match[-1] !~ /\D/) {
    ...
        }
        $_ = "@match\n";
    }
    
  2. or download this
        /([^ ]+)\s+([^ ]+)\s+([^ ]+)...\s+(\d{1,3})\s+(\d+)$/
    
  3. or download this
        /(\S+)\s+(\S+)\s+(\S+)\s+...\s+(\d{1,3})\s+(\d+)$/
    
  4. or download this
        my $pat = join ( '\\s+', (
           ('(\\S+)' x 15),
    ...
           '(\\d+)',
        ));
        $pat = qr/\A$pat\z/;