#!/usr/bin/env perl # Author : Rick van der Zwet # S-number : 0433373 # Version : $Id: inv2human.pl 322 2007-11-22 14:09:00Z rick $ # Copyright : FreeBSD Licence # # 1. AtLeaf 9. PutInfo # 2. GoRoot 10. GetInfo # 3. ExistsChild 11. GotoNode # 4. GoChild 12. GetNode # 5. FirstChild 13. Show # 6. NextChild 14. Show (2) # 7. AddChild 15. Opnieuw beginnen # 8. RemoveChild 16. Stoppen @input = ; @onecommand = (1,2,5,10,11,12,13,14,15,16); @number2name = ( 'ERROR: Option Zero', 'AtLeaf', 'GoRoot', 'ExistsChild', 'GoChild', 'FirstChild', 'NextChild', 'AddChild', 'RemoveChild', 'PutInfo', 'GetInfo', 'GotoNode', 'GetNode', 'Show', 'Show (2)', 'Opnieuw beginnen', 'Stoppen', ); while ( my $line = shift(@input) ) { printf "%-5d #", $line; chomp $line; if ( grep(/^$line$/, @onecommand) ) { print $number2name[$line] . "\n"; } else { $value = shift(@input); chomp($value); print $number2name[$line] . " - " . $value . "\n"; printf "%-5d #Value\n", $value; } }