On Jan 2, 2:33 am, chas.ow...@gmail.com (Chas. Owens) wrote:
> 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.- Hide 
> quoted text -
>
> - Show quoted text -


In order to "open" or start a file from within a Perl program, I found
that the following command can be used:

system("start filename.ext");

"ext" can be any such as txt, xls and so on.


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to