thx 4 the help#----------------------------------------------------------- sub findTheTypeByTheName{ my $tree = $_[0]; my $name = $_[1];#$name is each line from the config file my $assignment = $tree->{assignment};#$assignment is an array #----------------------------------------------------------- Function: #open Config file open(TXTDOC, $ARGV[1]) || die "Cant open file" . $ARGV[1] . " for comp +aring!\n"; while (<TXTDOC>){ my $name = $_; chomp $name;#remove newlines $name=~s/(\s+)\z//;#rem white space $typeMatched = findTheTypeByTheName($tree,$name); prettyPrintTheType($typeMatched); my $noName = null;#tried to assign to scalar if ($noName){ print "$name . "Is not matched to an ASN name"; } } foreach $theAssignment (@$assignment) { if ($name eq $theAssignment->{ident}{__VALUE__}) { return $theAssignment->{type}; } } return null; }
In reply to using return types by Brother Sharky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |