CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [blackeagle225] Reading two lines at a time: Edit Log



miller
User

Jun 22, 2011, 2:23 PM


Views: 5085
Re: [blackeagle225] Reading two lines at a time

Cool, glad you figured it out. I'd probably do something like the following:


Code
my $lastline = <FILE>; 

while (<FILE>) {
# Work with $_ and $lastline
...

$lastline = $_;
}



(This post was edited by miller on Jun 22, 2011, 3:09 PM)


Edit Log:
Post edited by miller (User) on Jun 22, 2011, 3:09 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives