use IO::File; print "\n Comparing data:\n" ; my $outfile = "/project/ls1socdft/user/pooja/test_plan_checker/dfta/pe +rl/parse_xls/script/result.log"; open (OUTFILE, ">/project/ls1socdft/user/pooja/test_plan_checker/dfta/ +perl/parse_xls/script/result.log" ) or die "Cannot open $outfile for +writing \n"; print OUTFILE "Content of TPC file:.\n"; open(FILE, "<//project/ls1socdft_nobackup/rev2.0/user/Shah-B53654/dft/ +dfta/tpc/get_pat_info/output_0/report/report_all_wgl.pm") or die "Can +not open "; my @array = <FILE>; my @final_array; my @tp_array; my @handles; my $i=0; my $j=0; my %main_file ( foreach $_ (@array){ if($_ =~ /^$/ || $_=~ /return/ || $_=~ /RETURN/|| $_=~ /1;/) { } else{ $final_array[$i]=$_; print OUTFILE "$_"; } $i++; } foreach $_(@final_array){ $_=~ s/require//; $_=~s/[';]//g ; $tp_array[$j]=$_; print OUTFILE "$tp_array[$i] \n"; $j++; #my @new_array = @tp_array; my $fh = 0 ; foreach (@tp_array) { print "tp array : $_\n\n";} } # foreach (@tp_array) { # print "Checking file: $_\n"; # open my $fh, '<',$tp_array or die "$!\n"; #can we try smthng else??i mean ny othr idea? #} close(FILE);

In reply to Re^2: Perl Script by Pjshh6
in thread Perl Script by Anonymous Monk

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.