girarde has asked for the wisdom of the Perl Monks concerning the following question:
does not work. What am I overlooking?open($eis_fh, ">", "EIS.txt") or die "no handle to write EIS users"; Roundup($EIS_O, $eis_fh); sub Roundup { my ($root, $fh) = (@_); foreach (in $root) { my $thing = $_; if ($thing->{class} eq 'organizationalUnit') { my $thong; foreach (in $thing) { $thong = $_; Roundup($thong); } } elsif ($thing->{class} eq 'user') { my $string; $string .= $thing->{employeeID}; $string .= "\t" ; $string .= $thing->{sAMAccountName} ; $string .= "\t" ; $string .= $thing->{department} ; $string .= "\t" ; $string .= $thing->{o} ; $string .= "\t" ; $string .= $thing->{physicalDeliveryOfficeName} ; $string .= "\n"; print { $fh } $string; } else { } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing lexical filehandles
by tobyink (Canon) on Jan 15, 2014 at 16:35 UTC | |
by girarde (Hermit) on Jan 15, 2014 at 16:40 UTC | |
|
Re: passing lexical filehandles
by sn1987a (Curate) on Jan 15, 2014 at 20:25 UTC | |
by girarde (Hermit) on Jan 16, 2014 at 20:04 UTC |