Cool. I think I have an idea - what is your question?
tim
-Original Message-
From: Anand, Pankaj [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 2:18 PM
To: 'Beginners (E-mail)
Subject: change the format of file.
Hi ,
I want to make a perl script which can take the
Hi,
Try this (modifing up as you please):
open (INPUT, "input.txt" ) or die "Can't open: $!";
open (OUTPUT, "output.txt") or die "Can't open: $!";
my %data;
my $state = 0;
while () {
chomp;
$data{$state++} = $_ if $state == 0;
$data{$state++} = $_ if $state == 1;
$data{$state+
2 12:18
To: 'Beginners (E-mail)
Subject: change the format of file.
Hi ,
I want to make a perl script which can take the input from a file which is
in this form -
name1
name2
I want to change it to this format -
definition1 name1
definition2
definition3
definition4:nam
Hi ,
I want to make a perl script which can take the input from a file which is
in this form -
name1
name2
I want to change it to this format -
definition1 name1
definition2
definition3
definition4:name1
definition1 name2
definition2
definition3
definition4:name1
and so