in reply to Re^8: Perl Builds an LDIF
in thread Perl Builds an LDIF
For better control of loops, separate the "loop" part from "Read input" for "MGR":
while (defined my $input1=<PERSON>) { my $input2 = <MGR> or die "No corresponding MGR for $input1"; chomp $input1; # Are you sure you want to chomp ? If so, you probably need \n + when printing chomp $input2; print OUT $input1; print OUT "changetype: modify"; print OUT "replace: manager"; print OUT $input2, "\n"; }
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Perl Builds an LDIF
by rfransix (Novice) on Jun 21, 2010 at 21:42 UTC | |
by NetWallah (Canon) on Jun 23, 2010 at 04:52 UTC | |
by rfransix (Novice) on Jun 23, 2010 at 14:51 UTC |