1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

WriteFile Equivalent in perl

Discussion in 'Perl' started by rag84dec, Mar 15, 2009.

  1. rag84dec

    rag84dec New Member

    Joined:
    Jul 17, 2007
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    0
    HI all,
    I want to write some data to a tape drive through perl.. one idea
    is to use scsi commands to send data.But i want to write it through
    filesystem with the usage of something like "WriteFile" in c++.Can
    anyone help me ??..Is there something equivalent to "WriteFile"
    in perl??...Any other idea to write data into Tape drive???

    THanks
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Code:
    #!/usr/local/bin/perl
    open (MYFILE, 'abc.txt');
    while (<MYFILE>) {
      chomp;
      print "$_\n";
    }
    close (MYFILE); 
    Not a PERL Expert but knows very little
     

Share This Page