in reply to passing lexical filehandles
foreach (in $root): Perl doesn't have a built-in function called in, so I'm assuming you've defined one somewhere, and this makes sense.
You call Roundup($thong), but the Roundup function seems to expect two arguments, not one.
This bit:
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";
Might be clearer expressed as:
my $string = join("\t", $thing->{employeeID}, $thing->{sAMAccountName}, $thing->{department}, $thing->{o}, $thing->{physicalDeliveryOfficeName}, )."\n";
Or even:
my $string = join("\t", @$thing{ qw( employeeID sAMAccountName department o physicalDeliveryOfficeName ) })."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: passing lexical filehandles
by girarde (Hermit) on Jan 15, 2014 at 16:40 UTC |