Hello,
Can you please tell me where I am missing something...
The error stats that $file is not initialised while reading instruction for opening DATA.
Thanks.
#!/usr/bin/perl -w
use strict;
use diagnostics;
my $count=0;
open STREAM, "/bin/ls /var/tmp/*SED |" or die "Could not do ls" ;
while (<STREAM>) {
chomp;
my $file;
print "Your Input is $file\n";
open (DATA,"$file");
while(<DATA>) {
chomp;
print;
print (++$count % 3 ? " " : "\n");
close DATA ;
}
}
close STREAM;
Can you please tell me where I am missing something...
The error stats that $file is not initialised while reading instruction for opening DATA.
Thanks.
#!/usr/bin/perl -w
use strict;
use diagnostics;
my $count=0;
open STREAM, "/bin/ls /var/tmp/*SED |" or die "Could not do ls" ;
while (<STREAM>) {
chomp;
my $file;
print "Your Input is $file\n";
open (DATA,"$file");
while(<DATA>) {
chomp;
print;
print (++$count % 3 ? " " : "\n");
close DATA ;
}
}
close STREAM;