Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: To enhance the script to cover new rules

by freekngeek (Acolyte)
on Jan 09, 2013 at 12:21 UTC ( #1012465=note: print w/ replies, xml ) Need Help??


in reply to Re: To enhance the script to cover new rules
in thread To enhance the script to cover new rules

Sorry, I really don't want anyone to write a code for me because it's not right. The thing is I am having a hard time understanding the old script that I do not understand 100% - I did not write it. I don't know how this script is working to calculate the values in techfile then matching those values with the reference file. Can you tell me how this part is working ?

if($blockEMDC > 0) { $zzBlock=&CharCount($zzBlock,$i); push @readin, $i; #line added to array if($zzBlock == 0) { $blockEMDC=0; $readin=join(' ',@readin); #connect whole block to one + string $_=&CreateHash($readin,\%{$metals{$curlev}{'POLY_BASED +_EM_DC'}},'DC'); #if(!$_) {print("$curlev DC consistent is fine!\n")};# +only for debugging if($_==1){print("$curlev DC lentgh AND width ranges bl +ock is missing!\n")} elsif($_==2){print("$curlev DC count of lentgh-ranges +AND count of EM_POLYNOMIALS blocks doesn't match!\n")} elsif($_==3){print("$curlev DC count of width-ranges A +ND count of EM_POLYNOMIALS block-lines doesn't match!\n")} + undef @readin; undef $readin; undef $zzBlock; } }


Comment on Re^2: To enhance the script to cover new rules
Download Code
Re^3: To enhance the script to cover new rules
by Anonymous Monk on Jan 09, 2013 at 13:18 UTC

    Can you tell me how this part is working ?

    Kind of broad and unanswerable :/

    pick a line and explain what you understand, and what you don't understand, or are you asking about something else

Re^3: To enhance the script to cover new rules
by pvaldes (Chaplain) on Jan 09, 2013 at 16:35 UTC
    if($_==1){ print("$curlev DC lentgh AND width ranges block is missing!\n")}

    you don't need the parentheses here, same as:

    if($_==1){ print $curlev, ' DC lentgh AND width ranges block is missing!\n'}

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012465]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (15)
As of 2014-07-10 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (207 votes), past polls