[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Simple Perl Question



	'split' is probably what you are looking for.
	don't suck the whole file into an array if the file tends to be
big or your RAM is at premium.

	$ifile = "./52.txt";
	open(INFO, $ifile) or die "Failed to open $ifile: $!\n";
	my $junkFirstline = <INFO>;
	while (<INFO>) {
		chomp;
		@fields = split /|/;
		# do something with those fields
	}
	close(INFO);




---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.