Even when you get your syntax right, you're still going to get each line in forwards 
sequential order with the characters printed in reverse.  You need to use 
File::ReadBackwards or the like if you want the lines in reverse order as well.

-----Original Message-----
From: Randy W. Sims [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 4:12 PM
To: Norman Zhang
Cc: [EMAIL PROTECTED]
Subject: Re: create file


> So if I change my program to
> 
> #!/usr/bin/perl -e
> use strict;
> $a= "myin.txt";
> $b="myout.txt";
> open(IN, $a) || die "cannot open $a for reading: $!";
> open(OUT, ">$b") || die "cannot open $b for reading: $!";
> while (<IN>) {
>    print scalar reverse OUT $_;


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to