develooper Front page | perl.perl6.users | Postings from July 2019

while(<>){...} analog?

Thread Next
From:
Joseph Brenner
Date:
July 28, 2019 23:21
Subject:
while(<>){...} analog?
Message ID:
CAFfgvXV+eW1jCGuhtFVkPKGXN-P7RCE3N42=UsDeESP7aQSipQ@mail.gmail.com
I was just wondering if there's some direct analog in perl6 to the
perl5 construct:

  while(<>){ ... }

If I'm planning on passing a filename on the command-line, I can just
get it out of $*ARGFILES easily enough, but what if I also wanted it
to work on lines passed in via standard input?

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About