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: Re: [MB123] File parsing problem, Use of uninitialised value error.: Edit Log



Laurent_R
Enthusiast / Moderator

Nov 12, 2012, 10:16 AM


Views: 9383
Re: [MB123] File parsing problem, Use of uninitialised value error.

Yes, the error message tells you where it encountered the problem in the input file, at the very end of the message (what you quoted as XXXX in your post is actually yhe line number where the problem occurred. All you need is that line plus the two previous ones.

Assuming you error message is on line 128, you could print the faulty lines by typing at the prompt:


Code
perl -ne 'print if 126..128' input.txt

(If under Windows, if becomes:
perl -ne "print if 126-128" input.txt
i.e. replacing single quotes by double quotes.)


(This post was edited by Laurent_R on Nov 12, 2012, 10:30 AM)


Edit Log:
Post edited by Laurent_R (Enthusiast) on Nov 12, 2012, 10:30 AM


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

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