On 13 Jul 2014, at 21:43, ESChamp <esch...@gmail.com> wrote:

> ...lastname firstname other other other ... emailaddress
> 
> I wish to write a new file that contains only the emailaddress field
> contents.

Here’s an easily-understood way of doing it:

#!/usr/bin/perl
use strict;
while (<DATA>){
  chomp;
  @_ = split / /;
  print $_[-1] . $/;
}
__DATA__
x x x a@b
x x x x c@d
x x e@f




--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to