Code Comments
Programming Forum and web based access to our favorite programming groups.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? Thank you, Kevin Kevin Viel, PhD Post-doctoral fellow Department of Genetics Southwest Foundation for Biomedical Research San Antonio, TX 78227
Post Follow-up to this messageKevin 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 = <FILE>; # Grap one line from file John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall
Post Follow-up to this message> -----Original Message----- > From: John W. Krahn [mailto:krahnj@telus.net] > Sent: Tuesday, January 15, 2008 1:39 PM > To: Perl Beginners > Subject: Re: while and last > my $data = <FILE>; # Grap one line from file Doh! Thanks :) Kevin Viel, PhD Post-doctoral fellow Department of Genetics Southwest Foundation for Biomedical Research San Antonio, TX 78227
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.