in reply to passing lexical filehandles

  1. 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.

  2. You call Roundup($thong), but the Roundup function seems to expect two arguments, not one.

  3. 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";
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^2: passing lexical filehandles
by girarde (Hermit) on Jan 15, 2014 at 16:40 UTC
    Thanks: I omitted mentioning use Win32::OLE qw(in); and I forgot that call to recurse needs both arguments as well.