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: Beginner:
DBI + perl

 



deepthi
New User

Feb 13, 2011, 4:39 AM

Post #1 of 2 (803 views)
DBI + perl Can't Post

Hi
I am new to perl.
I am trying to read all the lines of a file,which is a result of an mysql query.But the last line can not be read by using foreach command.This problem happens only when we use mysql query and foreach together.Otherwise there is no problem with foreach.I am sending my code
Attachments: testperl.pl (1.13 KB)


FishMonger
Veteran / Moderator

Feb 13, 2011, 1:31 PM

Post #2 of 2 (777 views)
Re: [deepthi] DBI + perl [In reply to] Can't Post

Why did you comment out the use strict and warnings lines?

Your first step is to uncomment those 2 lines and fix the problems that they point out. Ignoring those problems is leading you down a very messy and bad road.

Why are you outputting the sql query data to a file and then immediately reopen the file to readin that data?

 
 


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

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