Loading ...
Sorry, an error occurred while loading the content.

[PBML] Re: reading a text file

Expand Messages
  • crengifo@reacciun.ve
    I´m sorry, but my files archi.pl and archi2.pl have an error. Please, write those lines again: archi.pl and archi2.pl: It says: close(LEITURA) || die cannot
    Message 1 of 3 , Nov 14, 1999
    • 0 Attachment
      I´m sorry, but my files archi.pl and archi2.pl
      have an error. Please, write those lines again:

      archi.pl and archi2.pl:

      It says:
      close(LEITURA) || die "cannot close $a: $!"; # close the file

      Should say:
      close(LEITURA) || die "cannot close $!"; # close the file

      In my test file, I had written:
      $a="cand.txt"; (archi.pl) and
      $a="cand2.txt"; (archi2.pl)

      Excuse me, again.

      Carmelo Rengifo A.



      Send reply to: perl-beginner@egroups.com
      Date sent: Fri, 12 Nov 1999 07:27:24 -0800
      From: silviaza@...
      To: perl-beginner@...
      Subject: [PBML] reading a text file

      > I have created a perl script to read and query a text file. It is very
      > simple, but it do not work because it can not find the file!
      >
      > I have already put the file in different directories, with different
      > permissions but when I test for the existence of the file, the script
      > tells me it isn't there.
      >
      > Below it's the part of the script that tests for the existence of the
      > text file.
      >
      > if (-e "/cand2.txt") {
      > open (LEITURA, "/cand2.txt");
      > } else {
      > print "The file /cand2.txt doesn't exist!\n";
      > exit;
      > }
      >
      >
      > ------------------------------------------------------------------------
      > et the most popular downloads on the Web. They¹re new!
      > They¹re hot! They’re FREE! Utilities, drivers, games.
      > It’s all here. http://clickhere.egroups.com/click/1610
      >
      >
      >
      > -- Talk to your group with your own voice!
      > -- http://www.egroups.com/VoiceChatPage?listName=perl-beginner&m=1
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.