- or download this
open (my $fh, '<text.txt');
...
/^([^ ]+) ([^ ]+)/;
print "$1 $2" . "\n" if $1 && $2;
}
- or download this
hello one two three
kjsf
kjsd
kjd
- or download this
hello one
hello one
hello one
hello one
- or download this
while (my $line = <$fh>) {
$line =~ /^([^ ]+) ([^ ]+)/;
print "$1 $2" . "\n" if $1 && $2;
}
- or download this
hello one