This dog won't hunt.
Global symbol "$k" requires explicit package name at sesemin.pl line 72.
syntax error at sesemin.pl line 72, near "})"
where, by the time I sorted out the files and such, line 72 is:
&count_unique (@{$genes_number{$k});
Even fixing the trivial syntax error, one's left with the undefined $k at this point. I could guess at what $k is supposed to be here... but I think it's time for you to do some work !
Happy to try to help, but you need to put more effort in at your end, so that the code you offer:
- actually runs -- with strict and warnings.
- does not require other files to be downloaded -- let alone placed in special directories. (see below)
- does not require command line arguments -- whatever you need to demonstrate should be inside the code.
- illustrates the issue you have, with the minimum of code.
- supports the question you've posed... "I am trying to achieve blah to which end I have written blather which is supposed to mangle stuff so, but what I get is a crick in my neck...., as demonstrated in the very wonderful code here...
- and all the other good advice in How do I post a question effectively?
If your code only has one input file, then __DATA__ is the obvious replacement.
If your code has several inputs, then this will do the trick. First, comment out (or remove) the original open commands and replace as illustrated:
#open FOO, "my_favourite.yum" or die "horribly $!" ;
open FOO, '<', &my_favourite_yum or die "horribly $!" ;
then at the end of your example code place:
#______________________________________
# ... description of the data ...
sub my_favourite_yum { \(<<'~~FILE') }
... contents of my_favourite.yum go here ...
~~FILE
#______________________________________
# ... description....
sub my_other_favourite { \(<<'~~FILE') }
... contents of my_other_favourite go here ...
~~FILE
#______________________________________
where:
- obviously, the name of the sub must match the name in the relevant open, but may be anything you like that helps the reader.
- the end of file marker '~~FILE' can be anything you like, but obviously it must not appear in the data ! (For the avoidance of doubt, it may be different for each file, but must be the same in the two places it appears for each one.)
- the marker at the end of each "file" must have a newline at the end of it. (No other trailing whitespace. End-of-file will not do -- hence the suggested #____ line at the end.
- NB: tabs may be translated to one or more spaces in the upload process. But ...
- before posting, you must ensure that your example code works (and illustrates the issue you have) with the files embedded.
Update: removed spurious and erroneous & from sub &my_favourite_yum and sub &my_other_favourite. Thanks tinita. (Blushes deep crimson and wonders whether going back to bed and starting again is an option.)
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.