in reply to Re: n00b reading info from file
in thread n00b reading info from file

Something you may want to pay attention to: you didn't check your open for success. Make it a habit:

open FH, "<$filename" or die "can't open $filename: $!"; Also, skip the open business entirely (and process as many files as you want or if none given optionally take input from STDIN) by simply using <> to read: while (my $line = <>){ Lastly.. note that the author wanted the four y values in separate arrays..

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: n00b reading info from file
by Popcorn Dave (Abbot) on Jul 03, 2002 at 22:00 UTC
    Ah, you're right about the number of arrays. I guess I just read it wrong.

    As far as the solution, I agree, it's wise to check for open success. I just sort of did that on the fly to nudge the person towards their goal.

    Some people fall from grace. I prefer a running start...