ayob has asked for the wisdom of the Perl Monks concerning the following question:

hi, I am using Perl and have some problem how to create temp file for output after we extrect the html file to text, it means the text we extrect want to locate to other file. ayob,

Replies are listed 'Best First'.
Re: output file
by Aragorn (Curate) on Jan 29, 2003 at 10:30 UTC
    I'm not sure if I completely understand your question, but it seems to me that you can open a new file and store the text in that file:
    open(TEXT, ">textfile") or die "$!"; . . . print TEXT $some_text_line; . . . close(TEXT);
    If you really want to have temporary files, take a look at POSIX::tmpnam], IO::File::new_tmpfile or File::Temp.

    Arjen

Re: output file
by Heidegger (Hermit) on Jan 29, 2003 at 10:26 UTC
    use IO::Handle::new_tmpfile();
      IO::Handle doesn't have a method new_tmpfile, you probably meant IO::File::new_tmpfile().

      -- Hofmator