I am trying to write a script which takes data from tab diliminted text file ,and stores it in an array and then i want to replace it in an xml file .
the code...
#!/usr/local/bin/perl
sysopen SOURCE,openfil,2 or die "can't open file SOURCE ";
$nfo = <SOURCE>;
close SOURCE;
print "$nfo";
open (TARGET,">>target" or die "Can't open the file TARGET ";
$tar = <TARGET>;
print TARGET "$nfo\n";
close TARGET;
print "$tar";
@it = split(/\t/,$nfo);
foreach $row (@it) {
print " this is each row $it :$row \n";
}
print "$it[0]";
I an open to all suggestions.
the code...
#!/usr/local/bin/perl
sysopen SOURCE,openfil,2 or die "can't open file SOURCE ";
$nfo = <SOURCE>;
close SOURCE;
print "$nfo";
open (TARGET,">>target" or die "Can't open the file TARGET ";
$tar = <TARGET>;
print TARGET "$nfo\n";
close TARGET;
print "$tar";
@it = split(/\t/,$nfo);
foreach $row (@it) {
print " this is each row $it :$row \n";
}
print "$it[0]";
I an open to all suggestions.