Europa MacDonald
asked on
sorting output with tab spaces rather than commas
is it possible to delineate output with tab spaces rather than using commas
eg
322,345,432,455,655,677,89 9,540 to 322 345 432 455 655 677 899 540
I am using this code :
print OUT "$n1,$n2,$n3,$n4,$n5,$n6,$ n7,",(floo r $avg),"\n";
eg
322,345,432,455,655,677,89
I am using this code :
print OUT "$n1,$n2,$n3,$n4,$n5,$n6,$
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$, = "\t";
print $n1,$n2,$n3,$n4,$n5,$n6,$n 7,floor $avg;
$, = ",";
print $n1,$n2,$n3,$n4,$n5,$n6,$n 7,floor $avg;
print $n1,$n2,$n3,$n4,$n5,$n6,$n
$, = ",";
print $n1,$n2,$n3,$n4,$n5,$n6,$n
ASKER
thankyou
#print join("\t",$n1,$n2,$n3,$n4, $n5,$n6,$n 7,floor $avg),"\n"';
#print join(",",$n1,$n2,$n3,$n4,$ n5,$n6,$n7 ,floor $avg),"\n"';
#sorry, I left an extra character in
print join("\t",$n1,$n2,$n3,$n4, $n5,$n6,$n 7,floor $avg),"\n";
#and
print join("\t",$n1,$n2,$n3,$n4, $n5,$n6,$n 7,floor $avg),"\n";
#print join(",",$n1,$n2,$n3,$n4,$
#sorry, I left an extra character in
print join("\t",$n1,$n2,$n3,$n4,
#and
print join("\t",$n1,$n2,$n3,$n4,
ASKER
print join . . .
doesnt seem to want to work
doesnt seem to want to work
print join("\t",$n1,$n2,$n3,$n4, $n5,$n6,$n 7,floor $avg),"\n";
#and
print join(",",$n1,$n2,$n3,$n4,$ n5,$n6,$n7 ,floor $avg),"\n";
#and
print join(",",$n1,$n2,$n3,$n4,$
You could also replace the commas with tabs, but in a comment, it's difficult to distinguish tabs from spaces
print join(",",$n1,$n2,$n3,$n4,$