On 13 Jul 2014, at 21:43, ESChamp <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
