Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

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

For the OP's immediate problem it's likely they don't. However the type of issue the OP is having leads me to think that the OP hasn't wide programming experience so pointing out areas that are a frequent cause of subtle problems may help. For example the & calling convention leads to

doit(1, 2, 3); againSam(1, 2, 3); sub againSam { andAgain(); andAgain(); } sub doit { &andAgain; &andAgain; } sub andAgain { my (@values) = @_; print "<@values>\n"; }

printing:

<1 2 3> <1 2 3> <> <>

which may be surprising if you don't appreciate what &andAgain is doing. Mixing prototypes in may also be surprising:

sub andAgain ($); my @nums = (1, 2, 3); andAgain(@nums); &andAgain(@nums); sub andAgain ($) { my (@values) = @_; print "<@values>\n"; }

prints:

<3> <1 2 3>

I doubt either "issue" is what is troubling the OP currently. However & call usage at least is present in the OP's code and where there is & calling there are likely prototypes. Pointing out potential problem areas in the OP's code, even if it's not what the OP is asking about, helps the OP. Until the OP shows us some code that reproduces the actual problem the best we can do is offer help with a few style issues.

Note, the example code really isn't for educated_foo whom I'm sure knows all about this stuff. The examples are for those who are wondering what the fuss is about. Oh, and strictures are always useful, at the very least to pick up typos and brain farts.

True laziness is hard work

In reply to Re^3: Variables and Scope: The battle begins by GrandFather
in thread Variables and Scope: The battle begins by Shadow-Master

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 about the Monastery: (3)
As of 2024-04-25 22:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found