ailto:[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 &quo
On 1/2/2004 6:58 PM, Norman Zhang wrote:
Tim Johnson wrote:
What does it do when you try it?
I'm seeing an empty output file.
One thing I see right now is that you are attempting to print the
reverse of each line, but you are reading the lines sequentially,
which will not give the result you
Tim Johnson wrote:
What does it do when you try it?
I'm seeing an empty output file.
One thing I see right now is that you are attempting to print the reverse of each line, but you are reading the lines sequentially, which will not give the result you want. Also, you should get used to always "us
-
From: Norman Zhang [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 01, 2004 11:36 PM
To: Randy W. Sims
Cc: [EMAIL PROTECTED]
Subject: Re: create file
I want to list each character of the file backwards.
--
#!/usr/bin/perl -w
$a= "/loca
Owen Cook <[EMAIL PROTECTED]> wrote:
: When I first *discovered* comp.lang.perl.misc the very
: first posting I saw was an announcement from Uri Guttman
: advising a new edition of the read backwards module. I
: thought I'd fallen among madmen or jokers :-)
Now that you have been exposed to m
May I ask how could I list a file contents backward in a new file?
What is your definition of backwards?
I want to list each character of the file backwards.
e.g.,
File_A
hello.
how are you?
File_B
?uoy era woh
.olleh
perl -le 'print reverse <>' some-file-you-want-reversed
perl -le 'print reve
hu 1/1/2004 11:49 PM
To: [EMAIL PROTECTED]
Cc:
Subject: Re: create file
I want to list each character of the file backwards.
>> May I ask how could I list a file contents backward in a new file?
>
>
> What is your definition of backwards?
I want to list each character of the file backwards.
e.g.,
File_A
hello.
how are you?
File_B
?uoy era woh
.olleh
> perl -le 'print reverse <>' some-file-you-want-reversed
>
> perl -
On Thu, 1 Jan 2004, Norman Zhang wrote:
> May I ask how could I list a file contents backward in a new file?
>
You might want to look at
File::ReadBackwards
When I first *discovered* comp.lang.perl.misc the very
first posting I saw was an announcement from Uri Guttman advising a new
edition
On 1/2/2004 2:04 AM, Norman Zhang wrote:
Hi,
May I ask how could I list a file contents backward in a new file?
What is your definition of backwards?
perl -le 'print reverse <>' some-file-you-want-reversed
perl -le 'print reverse map {join "", reverse split //} <>'
some-file-you-want-reversed
10 matches
Mail list logo