I got rid of eval as replace it w/ below and seem to work well
Problem now is that I cannot access the hash outside of block.. why?? meaning when I do a dump on hash,(which had element in it ; by printing inside of loop) , nothing comes up.
my (%report_ccr,%report_asr); my (%report_ccr_o,%report_asr_o); my (%report_stop, %report_o_stop); for (sort keys %totalcalls_o) { my $start_o_f = ($start_o{$_}) ? $start_o{$_} : 0; #for stop record outbound side; if (exists $stop_outbound{$_}) { #print "\$stop_o{$_} is $stop_o{$_}\n"; #print "\$stop_outbound{$_} is $stop_outbound{$_}\n"; $report_o_stop{$_} = sprintf("%.2f", ( ( $stop_outbound{$_} + / 60000 ) / $stop_o{$_})) ; #resultsin min mark #print "\$report_o_stop{$_} is $report_o_stop{$_}\n"; } elsif (defined $crank_o{$_}) { $report_ccr_o{$_} = sprintf("%.2f" , ( ( $start_o_f / ($tota +lcalls_o{$_} - $crank_o{$_}) ) * 100 )); $report_asr_o{$_} = sprintf("%.2f" , ( ( $start_o_f / $total +calls_o{$_}) * 100 )); #print "\$report_ccr_o{$_} is $report_ccr_o{$_}\n"; #print "\$report_asr_o{$_} is $report_asr_o{$_}\n"; } else { $report_asr_o{$_} = sprintf("%.2f" , ( ( $start_o_f / $total +calls_o{$_}) * 100 )); # print "from last \$report_asr_o{$_} is $report_asr_o{$_}\n +"; } } print "going dumper\n"; print Dumper(%report_ccr_o);

In reply to Re^4: eval not working the way I expected? by convenientstore
in thread eval not working the way I expected? by convenientstore

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.