Chaim Frenkel wrote:
> What does
> 
>         $foo = <"filename">;    # 1
>         $bar = <"another">;
>         $gaz = <"filename>;     # 2
                           ^ add " here

> Does #2 get the second line or the first?

$gaz contains the second line.  Otherwise this:

  while (<'filename'>){print;};

won't work.  This gets a little hairy, I admit.  

> Can the <> contain a function? 

Of course.  Stick any old list there.

> Your example seems to indicate that
> it can. But if it is hard for me to parse visually, I'm not sure
> how easy it would be for the parser.

This is an implemenation detail.  On the other hand, I was hoping that
it would be easy for a human parser.  Perhaps it only takes some getting
used to.  Like the first time I saw something like:

  for ($foo){
    /pattern/ && next;
    print join ' ', /pattern_with_groups/;
  };

To my eye angle brackets signify input.  

Jon
-- 
Knowledge is that which remains when what is
learned is forgotten. - Mr. King

Reply via email to