Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Can't find any documentation on < a b c > syntax for lists

by LanX (Saint)
on Feb 14, 2023 at 14:33 UTC ( [id://11150360]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Can't find any documentation on < a b c > syntax for lists
in thread Can't find any documentation on < a b c > syntax for lists

> Why are these different?

> perl -MO=Deparse,-p -e 'print "$_\n" for < a >;'

> perl -MO=Deparse,-p -e 'print "$_\n" for <a>;'

a could be an old-style bare-word file-handle, but " a " can't

think

  • open a, "<", "filename"
instead of the common FH

one of the reasons why ppl are encouraged to use lexical filehandles:

  • open my $fh, "<", "filename"

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

  • update: added code tags in citations, thanks hippo++
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://11150360]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others taking refuge in the Monastery: (5)
    As of 2024-04-24 18:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found