"Walking" this structure is easy.:@array = ( ['C:\Source1\\', 'File1.txt', 'ReferenceIDForProcessing'], ['D:\Source2\sub\\', 'File2.txt', 'ReferenceIDForProcessing'], ['E:\Source3\sub2\\', 'File3.xml', 'ReferenceIDForProcessing'], ['C:\Source4\\', 'File4.pgp', 'ReferenceIDForProcessing'], );
for my $record (@array) { my $path = $record->[0]; my $name = $record->[1]; my $id = $record->[2]; print "$path $name $id\n"; }
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial DeltronicsIn reply to Re: Howto build an (associative?) array to process files in different locations
by CountZero
in thread Howto build an (associative?) array to process files in different locations
by shadowfox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |