in reply to Re^2: Print Uniqe elements of arry of hash
in thread Print Uniqe elements of arry of hash
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:
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:
then at the end of your example code place:#open FOO, "my_favourite.yum" or die "horribly $!" ; open FOO, '<', &my_favourite_yum or die "horribly $!" ;
where:#______________________________________ # ... 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 #______________________________________
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.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Print Uniqe elements of arry of hash
by sesemin (Beadle) on Oct 15, 2008 at 19:34 UTC |