Below is code chunk? line 275 is marked with line ***LINE 275***

the BuildFormat function is the second function which is called

Thanks Robert Walkup

sub PrintToStdOut{ $utlp->LogFile ("FUNCTION=PrintToStdOut\n") if($DEBUG); my($msg,@list)=@_; if(scalar(@list)){ my(@flist); ***LINE 275*** eval($utlp->BuildFormat($fields,"STDOUT",0,\@titles,\@l +engths)); $- = 0; $^L="\n"; if(scalar(@list)){ print STDOUT ("$msg"); if(scalar(@{$list[0]}) > 1){ #if >1 then it is + a multi array @flist=@list; } else{ #is it is a array push @flist,[ @list ]; } for my $ref (@flist){ @cols = @$ref; write STDOUT; } } } else{ print STDOUT ("$msg"); } } sub BuildFormat{ my $self = shift; my($fld_cnt,$fmt,$ext,$titles,$lengths)=@_; $self->LogFile ("FUNCTION=BuildFormat\n") if($self->{DEBUG}); $ext=0 if(!$ext); my(@titles)=@$titles; my(@lengths)=@$lengths; my($format_top) = "format ${fmt}_TOP =\n"; my($format) ="format $fmt =\n"; my($fmtStr); my($colStr); my($headerStr); my($lines); my($i); for ($i=0;$i<$fld_cnt;$i++){ my $strLen=$lengths[$i]; my $tmp=$strLen; $strLen=length($titles[$i]) if(length($titles[$i])>$st +rLen); $strLen=$strLen+$ext; $headerStr="$headerStr" . " " if($i); $lines="$lines" . " " if($i); $fmtStr="$fmtStr" . " " if($i); $colStr="$colStr" . " " if($i); $colStr="$colStr" . $self->rpad('@',$strLen+1,'<'); $headerStr="$headerStr" . $self->rpad($titles[$i],$str +Len+1); $lines="$lines" . $self->rpad("-",$strLen+1,"-"); $fmtStr="$fmtStr" . "\$cols[$i]"; $fmtStr="$fmtStr," if($i < $fld_cnt-1); } $format_top="$format_top" . "$headerStr\n" . "$lines\n" . ".\ +n\n"; $format="$format" . "$colStr\n" . "$fmtStr" . "\n.\n\n"; $format="$format_top" . "$format"; $self->Log("FORMAT -> $format") if($self->{DEBUG}); print("FORMAT -> $format") if($self->{DEBUG}); #print STDOUT ("FORMAT -> $format"); return($format); }

In reply to Re: Re: setuid script returning Insecure dependency by rdww
in thread setuid script returning Insecure dependency by rdww

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.