develooper Front page | perl.perl6.users | Postings from September 2018

Appropriate last words

Thread Next
From:
Parrot Raiser
Date:
September 3, 2018 16:03
Subject:
Appropriate last words
Message ID:
CACwLAp_AhnwxNmSAw73xdf__m4i8n1ju_SkTNaL9hrQonv8gRw@mail.gmail.com
perl6 -v
This is Rakudo Star version 2018.06 built on MoarVM version 2018.06
implementing Perl 6.c.

In Perl 5:
die "Message";   outputs Message, followed by the program line number.
die "Message\n" outputs Message
without further ado.

Perl 6 "die" produces line numbers regardless of the line ending.

$ perl6 -e 'die "message";'
message
  in block <unit> at -e line 1

$perl6 -e 'die "message\n";'
message

  in block <unit> at -e line 1

What's the Perl 6 equivalent for line number suppression?
https://docs.perl6.org/routine/die is silent on the topic.

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