in reply to Reading from files
You can use something like this:
$ cat t.pl #!/usr/bin/perl use strict; use warnings; while (<DATA>) { my @f = split /\s+/, $_; my $last = pop @f; print $last, "\n"; } __DATA__ the quick red fox jumped over the lazy brown dog. Now is the time for all men to come to the aid of their party. $ perl t.pl fox lazy is all to their party.
You could use shift to get the first column, or just use normal array indexing to get any column you like.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|