Help for this page

Select Code to Download


  1. or download this
    /^(\S+)/ && print "$1\n" while <DATA>;
    
    ...
    EXAMPLE2
    EXAMPLE3
    EXAMPLE4
    
  2. or download this
    while (my $line = <DATA>) {
        if ( $line =~ /^(\S+)/ ) {
            print "$1\n";
        } 
    }