The text from and #!address down to a line constitutes acceptable text for a data-file. The first example will have fields collected by array; the delineator is a tab (hard to see I know); and email addresses in column 0. The last names are in column 1 with the first names in column 2. The data records will be $emails{'Bullwinkle@wossamotta.edu'} $emails{'Rocket@frostbitefalls'} $emails{'Boris@pottsylvania.gov'} $emails{'Natashs@pottsylvania.gov'}Each of these variables is an array.
$emails{'Bullwinkle@wossamotta.edu'}=['Bullwinkle@wossamotta.edu','Moose','Bullwinkle']; $emails{'Rocket@frostbitefalls'}=['Rocket@frostbitefalls','Squirrel','Rocket']; $emails{'Boris@pottsylvania.gov'}=['Boris@pottsylvania.gov','Badenov','Boris']; $emails{'Natashs@pottsylvania.gov'}=['Natashs@pottsylvania.gov','Fatale','Natasha'];
Example 1
#!address Bullwinkle@wossamotta.edu Moose Bullwinkle Rocket@frostbitefalls Squirrel Rocket Boris@pottsylvania.gov Badenov Boris Natashs@pottsylvania.gov Fatale Natasha
The second example will have fields collected by hash; the delineator is still a tab (still hard to see) and the hash-keys for the fields are 'email', 'last' and 'first'. The data records are the same but now each of these variables is a hash.$emails{'Bullwinkle@wossamotta.edu'}={email=>'Bullwinkle@wossamotta.edu',last=>'Moose',first=>'Bullwinkle'}; $emails{'Rocket@frostbitefalls'}={email=>'Rocket@frostbitefalls',last=>'Squirrel',first=>'Rocket'}; $emails{'Boris@pottsylvania.gov'}={email=>'Boris@pottsylvania.gov',last=>'Badenov',first=>'Boris'}; $emails{'Natashs@pottsylvania.gov'}={email=>'Natashs@pottsylvania.gov',last=>'Fatale',first=>'Natasha'};
Example 2
#!address -t'h' email last first Bullwinkle@wossamotta.edu Moose Bullwinkle Rocket@frostbitefalls Squirrel Rocky Boris@pottsylvania.gov Badenov Boris Natashs@pottsylvania.gov Fatale Natasha
The third example is identical to the second except now the delineator is clearly a tab.
Example 3
#!address -t'h' -d'\t' email last first Bullwinkle@wossamotta.edu Moose Bullwinkle Rocket@frostbitefalls Squirrel Rocky Boris@pottsylvania.gov Badenov Boris Natashs@pottsylvania.gov Fatale Natasha
The fourth example differs from the third only in having an addition hash.$emails{'Bullwinkle@wossamotta.edu'}={email=>'Bullwinkle@wossamotta.edu',last=>'Moose',first=>'Bullwinkle',secret=>'bull@pentagon.gov'}; $emails{'Rocket@frostbitefalls'}={email=>'Rocket@frostbitefalls',last=>'Squirrel',first=>'Rocket',secret=>'rock@pentagon.gov'}; $emails{'Boris@pottsylvania.gov'}={email=>'Boris@pottsylvania.gov',last=>'Badenov',first=>'Boris',secret=>'bad@free.com'}; $emails{'Natashs@pottsylvania.gov'}={email=>'Natashs@pottsylvania.gov',last=>'Fatale',first=>'Natasha',secret=>'fem@free.com'};
Example 4
#!address -t'h' -d'\t' email last first secret Bullwinkle@wossamotta.edu Moose Bullwinkle bull@pentagon.gov Rocket@frostbitefalls Squirrel Rocky rock@pentagon.gov Boris@pottsylvania.gov Badenov Boris bad@free.com Natashs@pottsylvania.gov Fatale Natasha fem@free.com
The fifth example produces the same data as the fourth, but hashed differently.$emails{'bull@pentagon.gov'}={email=>'Bullwinkle@wossamotta.edu',last=>'Moose',first=>'Bullwinkle',secret=>'bull@pentagon.gov'}; $emails{'rock@pentagon.gov'}={email=>'Rocket@frostbitefalls',last=>'Squirrel',first=>'Rocket',secret=>'rock@pentagon.gov'}; $emails{'bad@free.com'}={email=>'Boris@pottsylvania.gov',last=>'Badenov',first=>'Boris',secret=>'bad@free.com'}; $emails{'fem@free.com'}={email=>'Natashs@pottsylvania.gov',last=>'Fatale',first=>'Natasha',secret=>'fem@free.com'};
Example 5
#!address -t'h' -d'\t' -a'-1' email last first secret Bullwinkle@wossamotta.edu Moose Bullwinkle bull@pentagon.gov Rocket@frostbitefalls Squirrel Rocky rock@pentagon.gov Boris@pottsylvania.gov Badenov Boris bad@free.com Natashs@pottsylvania.gov Fatale Natasha fem@free.com