This code runs fine.But in command line arguments i run it for single file.I dont know how to make run for multiple files in single command line .Help me to fix it.
#!/usr/local/bin/perl
use strict;
use warnings 'all';
use CGI qw(:all);
use Getopt::Long 'GetOptions';
GetOptions(
'proj=s' => \my $proj,
'map_file=s' => \my $map_file,
'outdir=s' => \my $outdir,
);
open my $HTML, '>', $outdir or die $!;
print $HTML <<'_END_HEADER_';
<html>
<head><title>$map_file</title></head>
<body>
<table border=10>
<th>SL.NO</th><th>CHECKLIST ITEM</th><th>VALUE</th><th>COMMENTS</th><th>CONFIRMATION</th>
_END_HEADER_
open my $IN, '<', $map_file or die $!;
while (my $line = <$IN>) {
chomp $line;
print $HTML '<tr><td>' . join('</td><td>', split(/:/,$line)) . "</td></tr>\n";
#or
#print $HTML '<tr><td>' . $line =~ s|:|</td><td>|gr . "</td></tr>\n";
}
close $IN or die $!;
print $HTML <<'_END_FOOTER_';
</table>
</body>
</html>
_END_FOOTER_
close $HTML or die $!;
command execution as follows:
./rev.pl -proj “prj1” -map_file “/home/a/b/space/prj1/bk2/check10/rv1/rv.config” -outdir /home/a/c/prj1.html