#!/usr/bin/perl -w

open(FILE1, "friends.txt") || die "Can't open file";

while(<FILE1>)
{
  ($name, $age, $email) = split (/:/, $_);
  ($first, $last) = split (/\s+/, $name);
  print $first, $last, $age, $email, "\n";
 
}
close(FILE1);

