Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

abidq,

Stop for a moment. If you never answer any of my questions, precisely how much help do you think I can provide?

after that you can take my wife as well

I knew you had a sense of humor.

Ironically, this one line is the only reason I am going to continue trying to help you. The rest of your message basically says I'm too stupid to help you, so I am prepared to simply shut up and go away if that's the only useful thing I can do.

dn tell u didn understand my ques

The only alternative is to either lie to you, or to admit that I'm too stupid to help you. I do not understand the entirety of your question. Pieces of it seem to make sense, but your Perl script doesn't conform to what you seem to be saying -- which is almost certainly the problem here.

So if we can just get past these questions, we might be able to solve the problem. But this requires cooperation, and I don't understand why you won't just answer my questions.

I continue to live in fervent hope that we are merely having a communication problem, and that once past that, we can make progress.

please read my orig ques carefully

I have done so. Many times. I have even made reference to it when asking my questions. If you ask me to read your original message again, I will understand that I am too stupid to help you, and I will quietly surrender into the night. THE ORIGINAL MESSAGE IS NOT ENOUGH TO TRANSFER UNDERSTANDING. If you cannot accept this, then clearly you are so much smarter than me that I simply cannot comprehend your situation sufficiently to help you, and I will leave.

Or, alternatively, perhaps you could consider the faint possibility that maybe -- just maybe -- some clarification of your requirements is needed, and stoop to my level for a moment and answer my questions.

there are two input files

As I have repeatedly pointed out, your Perl script DOES NOT READ TWO FILES. It does read one, but it does not read two.

I suspect this is the crux of your problem. There are two input files, and you are not reading them.

Therefore, until you tell me where it is you think you're reading in the first file, I cannot help you.

So, apparently, in order to communicate, we have to overcome some hurdles:

  • Asking you questions doesn't work because you won't answer them;
  • Asking you to show what you're doing doesn't work because apparently you have no way to test your code without plugging it directly into a behemoth of a system and wait for it to be triggered;
  • Asking you to clarify your original message doesn't work because you seem supremely confident that anyone should be able to read it, comprehend it, and fully understand the problem with no further assistance from you.

So let's try yet another approach. (And I warn you, I'm running out of time, patience, and ideas on how to get you to provide useful information).

Here's a modified copy of your latest version of the script. Please use it for the next computational event and then ship me the resultant  asdebug.log  file.

That should answer the most fundamental of my questions and then maybe I'll get that flash of insight needed to solve this problem.

#!/usr/bin/perl $line=$ARGV[0]; #input file1 containing string list $name=$ARGV[1]; #output file, given at linux command chomp($line); chomp($name); &logit(2, "\$line = '$line'\n"); &logit(3,"\$name = '$name'\n"); $amino="ABC"; &logit(10, "\$amino = '$amino'\n"); @cc=split(//,$amino); $line=~ s/[\s]//g; &logit(14, "\$line = '$line'\n"); @prot=split(//,$line); $len=@prot; &logit(17, "\$len = '$len'\n"); open(NAS,">>$name"); print NAS"0"; close NAS; open(MAJ,"valfile"); #input file 2 containing values while($li=<MAJ>){ chomp($li); &logit(25, "\$li = '$li'\n"); $val=""; @value=split(/ +/,$li); for($p=0;$p<@prot;$p++){ &logit(30, "\$p = '$p'\n"); for($a=0;$a<@cc;$a++){ &logit(33, "\$a = '$a'\n"); if($prot[$p] eq "$cc[$a]"){ $val +=$value[$a]; &logit(39, "\$val = '$val'\n"); } } $val1=$val/$len; &logit(45, "\$val1 = '$val1'\n"); $val1=sprintf "%5.3f",$val1; } $number++; &logit(49, "\$number = '$number'\n"); open(MAL,">>$name"); print MAL" $number:$val1"; close MAL; } close MAJ; open(MAL1,">>$name"); print MAL1"\n"; close MAL1; exit; sub logit { my $logstr = join ' ', @_; if (open LOGFIL, ">>asdebug.log") { print LOGFIL "$logstr\n"; close LOGFIL; } }

Please send back the  asdebug.log  file and we'll see if we can't sort out what is going on.


In reply to Re^12: string value assignment by marinersk
in thread string value assignment by abidq

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-18 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found