On Thu, Jan 1, 2009 at 17:12, Collaborate <tolg...@yahoo.com> wrote: > On Jan 1, 3:46 pm, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote: >> Collaborate wrote: >> > After wiriting the output of a Perl program to a text file, I'd like >> > to immediately open (display the contents of) that text file from >> > within the code so I can see what's in the file. I am wondering if >> > there is a simple way to accomlish this. Thanks. >> >> How about simply printing the output to STDOUT as well? >> >> -- >> Gunnar Hjalmarsson >> Email:http://www.gunnar.cc/cgi-bin/contact.pl > > > Sending to SDTOUT is good for checking the output however there are > cases when there is formatting included in the output file. I am in > particular interested in seeind the contents of a file by opening it > from within the code. snip
Okay, you seem to be making contradictory statements: you are writing a text file (which by definition has no formatting) and you have some cases where there is formatting included in the output file. Since it sounds like you are not dealing with a normal ASCII or UTF-8 text file, what is actual format of the file you are dealing with? You can always open a file with the open function (as I demonstrated), but if you are working with a specific format of data you will most likely want to use a module that already knows how to process that format to read the data into a data structure that preserves the structure of the data. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/