Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
You cannot change how @ARGV is processed because one of the features of the app is to be able to launch it and have it look for files right off the bat. That's what that shift is there for within the for-loop. By changing to use pop, you have to now put the filenames you want to find, then the connection args, as opposed to the connection args before the optional filenames.

As for the three characters you chop by removing ampersands from two calls to a() and one call to h(), that also doesn't work. The reason for the ampersands is to pass on @_. Removing the ampersands doesn't do that, as demonstrated by this snippet:

sub a { print "'@_'\n"; } sub b { &a } sub c { a } b( 'foo' ); c( 'foo' ); -------- 'foo' ''

Additionally, you actually gained characters by not linebreaking at whitespace. If you look at the original, all five linebreaks were at places where whitespace was required. Matt Skala (the author) and I* spent hours figuring out how to arrange the functions so that every linebreak was consuming some piece of whitespace while still allowing for the use of the ampersand notation. It's a lot harder than it looks.

I'm sure there's 2-3 characters that can be shaved, but I'll be damned if I know where they are ...

* I'm the Rob Kinyon he mentions on his page.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.


In reply to Re: MoleSter update - Golf by dragonchild
in thread MoleSter update - Golf by cLive ;-)

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 meditating upon the Monastery: (4)
As of 2024-04-19 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found