[ale] Simple Perl Question

Jerry Z. Yu z.yu at ptek.com
Mon Feb 25 11:03:51 EST 2002


	'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.






More information about the Ale mailing list