Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Yup. Thats exactly the conflict I came across. I'm sure there is a very good reason for having an undelimited/space delimited optional first parameter, but it has always struck me as weird. It would be entirely feasible (I think) to check the first parameter to print and determine if it is a filehandle (either a direct or discuised one) and act appropriately?

I guess that in the case of a discuised one, this would mean that if you really wanted to print out the stringyfied version of $fh to standard out you might need to disabiguate the handle to prevent it be used as the target. Maybe print "$fh", 'other stuff'; or print +$fh "other stuff";. This seems like a rare enough occurance for the additional syntax to not be a problem.

I reasise that print $fh, 'stuff';<code> is slightly more verbose that <code>print $fh 'stuff';, but I nearly always have to go back and remove the extra comma that I type by habit when I get the "No comma allowed after filehandle ..." msg as it stands.

I'm not sure that there is any conflict with sort? Isn't the comma only optional if the first parameter to these calls is a bare block or subname? In which case, this would never be ambigous.

I see (now you've mentioned it) that exec can be used with ``indirect object'' syntax, which is another conflict, but I see that you can also use exec { $shell } arg-list; instead of exec $shell arglist;. Is there any situation where the former would act differently to the later? If not, would the deprecation of that latter be a bad thing?

Please note: I am only asking questions for my own curiosity. I am quite happy to leave the decisions to those with the knowledge and power to make them.



Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.


In reply to Re: Re: Re: Re: Re: Re: Re: NO PERL 6 by BrowserUk
in thread NO PERL 6 by batkins

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (8)
    As of 2014-11-27 01:42 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My preferred Perl binaries come from:














      Results (178 votes), past polls