0 Replies - 1640 Views - Last Post: 09 October 2007 - 09:42 AM

#1 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6819
  • View blog
  • Posts: 31,418
  • Joined: 10-May 07

Read a file, display the results

Posted 09 October 2007 - 09:42 AM

Description: Read a file, display the results
#!/usr/local/bin/perl
# Written by #2pencil 10/09/2007

$data_file="data.txt";
$i=1;

open(MYFILE, $data_file) || die("Could not open log file!");
@raw_data=;
foreach $line (@raw_data) {
	chop($line);
	print "$i) $linen";
	$i++;
}
close(MYFILE);

Is This A Good Question/Topic? 0
  • +

Page 1 of 1