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

problem in reading data from file (file handling )

Expand Messages
  • srikanth_99eee
    hi all , i have a probelm in reading text from the file and writing into file.i i will describe my probelm briefly i am doing this in windows os i installed
    Message 1 of 1 , May 2, 2006
    • 0 Attachment
      hi all ,

      i have a probelm in reading text from the file and writing
      into file.i i will describe my probelm briefly

      i am doing this in windows os
      i installed perl in c: directory and kepy my programs in folder
      inside c: directory ( perlsrik : directory name).

      my code goes on like this
      --------------------------------------------------
      #!/usr/local/bin/perl

      open (MYFILE, 'file_me.txt');

      while (<MYFILE>)
      {
      chomp;
      print "$_\n";

      }

      close (MYFILE);
      ---------------------------------------

      so i gave my program name as my_me.pl and the text where i stored
      data is in the same folder as my program is there and its name is
      file_me.txt. .probelm is i have written some text into that while i
      am using above program to just read the data but i am unable to get it


      will be plz help me in solving this problem.

      srikanth
    Your message has been successfully submitted and would be delivered to recipients shortly.