I see what is happening, I think: I am writing to a
separate file each time through the loop and format
doesn't know that each time through is a different page,
I think. Any pointers on how to tell format to print
the header at the start of each new file would be
greatly appreciated.
Thanks for your help.
> The only problem I have with the following script is it
> does not print the header information on the first
> page. I must have missed something.
>
> I would appreciate any comments/suggestions.
>
> Thanks
>
> #!/usr/bin/perl -w
>
> use strict;
>
> use constant PATH
> => "/usr/local/scripts/security/sybase/user/";
> use constant GROUPS => "group_files.doc";
> use constant ACCESS => "user_access_all.doc";
>
> my $user;
>
> open F_GROUPS, PATH.GROUPS or die "Can't open: $!";
>
> while (<F_GROUPS>) {
> chomp(my @field = split /:/);
>
> open OUT, ">$field[1]" or die "Can't open: $!";
> open F_ACCESS, PATH.ACCESS or die "Can't open:
> $!";
>
> while (<F_ACCESS>) {
> chomp ();
> $user = $_;
> write OUT if (/$field[0]/);
> }
>
> format OUT_TOP =
>
> ||||||||||||||||||||Company Name||||||||||||||||||||||
> ||||||||||||||||||||Report Title|||||||||||||||||||||||||
>
> Security Group First Name
> Last Name
> ..
>
> format OUT =
> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $user,
> ..
>
>
>
> close OUT or die "Can't close:
> $!";
> close F_ACCESS or die "Can't close:
> $!";
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]