|
-
Oct 16th, 2001, 06:02 AM
#1
Thread Starter
Addicted Member
perl script: Read and Write problem
I am trying to write a simple perl script which opens a file called file1.txt, reads the first 3 lines, and writes them to another file called output.txt
Can someone show me how to do this ? So far I have written the following:
#!/usr/bin/perl
# test.pl
use warnings;
use strict;
my $infile = "file1.txt";
my $outfile = "output.txt";
open FILE, $infile or die $!;
???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|