Re: sub for die?

2017-02-19 Thread Timo Paulssen
Hi, On 19/02/17 04:48, ToddAndMargo wrote: >"die" is not all that useful, as it always exits > with a "1". With "exit", you can set the exit code. that's leaving out a whole lot of context, though. "die" is a quick way to throw an exception. If an exception reaches the outermost part of you

Re: sub for die?

2017-02-18 Thread ToddAndMargo
On 02/17/2017 06:43 PM, ToddAndMargo wrote: Hi All, $ cat die.pl6 #!/usr/bin/perl6 use strict; # use warnings; # use lib; # fill name of lib in die "Curses on you!"; $ die.pl6 Curses on you! in block at ./die.pl6 line 7 What is the best way to exit, like "die", without the commentary

Re: sub for die?

2017-02-18 Thread ToddAndMargo
On 02/18/2017 03:30 AM, Timo Paulssen wrote: It is usually considered The Right Thing to output error messages to stderr instead of stdout; you can use "note" to output to stderr (and it'll also put a newline at the end for you, which print doesn't do). True. Thank you -- ~~~

Re: sub for die?

2017-02-18 Thread Timo Paulssen
It is usually considered The Right Thing to output error messages to stderr instead of stdout; you can use "note" to output to stderr (and it'll also put a newline at the end for you, which print doesn't do).

Re: sub for die?

2017-02-17 Thread ToddAndMargo
On 02/17/2017 06:43 PM, ToddAndMargo wrote: Hi All, $ cat die.pl6 #!/usr/bin/perl6 use strict; # use warnings; # use lib; # fill name of lib in die "Curses on you!"; $ die.pl6 Curses on you! in block at ./die.pl6 line 7 What is the best way to exit, like "die", without the commentary

sub for die?

2017-02-17 Thread ToddAndMargo
Hi All, $ cat die.pl6 #!/usr/bin/perl6 use strict; # use warnings; # use lib; # fill name of lib in die "Curses on you!"; $ die.pl6 Curses on you! in block at ./die.pl6 line 7 What is the best way to exit, like "die", without the commentary "in block " from the "die" command? I jus