RE: while and last

2008-01-15 Thread Kevin Viel
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 15, 2008 1:39 PM > To: Perl Beginners > Subject: Re: while and last > my $data = ; # Grap one line from file Doh! Thanks :) Kevin Viel, PhD Post-doctoral fellow Depa

Re: while and last

2008-01-15 Thread John W. Krahn
Kevin Viel wrote: Hello, Hello, If I only want the data on the first line of a file, can I use "last" to exit the loop or should I consider another tool? Don't use a loop at all: my $data = ; # Grap one line from file John -- Perl isn't a toolbox, but a small machine shop where you ca