Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help reqd in Formatting

Status
Not open for further replies.

Zoom1234

Programmer
Oct 30, 2003
116
BE
Hi,

I am getting record as follows

Code:
foreach $file ( ) {
..//some regex
..//$dir = $1 ; #this can be repeated in foreach loop
..//$file for $dir
..//$owner for $file
..//associated files for $file
}

I want output like this

Dir Name

FileName1 Owner1
Associated file1
Associated file2

FileName2 Owner2
Associated file3
Associated file4

How do i acheive the format..whether i have to form hash of hash ..?
Any inputs..
TIA



 
Code:
if ($olddir eq $dir) {
  print "$dir\n";
  $olddir=$dir;
}
print "$file\t$owner\n";
print "\t\t$assoc1\n";
print "\t\t$assoc2\n";
HTH

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
should be "ne" instead of "eq" in if ($olddir eq $dir) {

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top