Thanks in advance#!/usr/bin/perl print "Content-type:text/html\n\n"; $parval="stat1_val"; if($parval eq "stat1_val"){ print "<b>Statistics of RUNS</b>"; my $var ; my $buffer=$ENV{'QUERY_STRING'}; my($path1,$filename)=split('#',$buffer); print "$path1 and $filename\n"; print "<html><head><body><form name=frm1>"; for my $path ( grep -d, </var/www/directory/*> ) { my($first,$second,$third,$directory,$batches)=split('/' +,$path); my($ss,$ss1)=split('batch',$path); print "<div id=$ss1 name=file><li><a href=?$path#$var o +nClick='oncli();'>$ss1 $batches</a></li></div>"; } my @var=`ls -f $path1| grep '.txt\$'`; foreach $var(@var){ $var=~s/\s+//g; print qq{<div id=siva><li><a href=# onclick="javascript +:window.open('readfile.pl?$path1/$var','To Read theText File','width=500,height=600')"> $i $var</a></li></div>}; } print "</form></body></html>"; } my program output is like this 1 batch1 2 batch2 3 batch3 4 batch4 5 batch5 file2.txt file5.txt file1.txt file3.txt but i need it in the following format 1 batch1 file2.txt file5.txt file1.txt file3.txt 2 batch2 3 batch3 4 batch4 5 batch5
In reply to how to format perl/cgi output in web page by sanku
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |