PERL   40

printfile

Guest on 22nd September 2022 12:31:15 AM

  1. #!/usr/local/bin/perl
  2.  
  3. open(FILE,"foo.dat");
  4.  
  5. while(<FILE>) {
  6.   chomp;
  7.   if ($_ ne "") {
  8.     ($last,$first,$email) = split /::/;
  9.     print "$first $last\'s email address is $email\n";
  10.   }
  11. }

Raw Paste


Login or Register to edit or fork this paste. It's free.