RE: Splitting colon delimited file in sub

2004-08-13 Thread Charles K. Clarkson
William Paoli <[EMAIL PROTECTED]> wrote: : What is this doing? Very little. See below. : sub data_file { : open FILE, "colon-delimted.txt"; Always verify I/O operations. my $file = 'colon-delimted.txt'; open FH, $file or die qq(Cannot open "$file": $!); : while ( my $line = ) {

Splitting colon delimited file in sub

2004-08-12 Thread William Paoli
What is this doing? am I on the right track? I want to populate this into a hash after splitting it: sub data_file{ open FILE, "colon-delimted.txt"; while (my $line = ) { $line = ($driver,$sponsor,$owner,$chief,$car,$bio,$team) = split /:/, @_; } } _