Re: print to STDERR problem

2017-02-18 Thread ToddAndMargo
On 02/18/2017 07:35 PM, Brandon Allbery wrote: On Sat, Feb 18, 2017 at 10:33 PM, ToddAndMargo > wrote: am having issues writing to STDERR. I am using this as a reference: https://perl6.org/archive/rfc/30.html

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: print to STDERR problem

2017-02-18 Thread Brandon Allbery
On Sat, Feb 18, 2017 at 10:33 PM, ToddAndMargo wrote: > am having issues writing to STDERR. I am using this as > a reference: >https://perl6.org/archive/rfc/30.html > >The p52p6 translator needs to be able to spot >instances of barewords and globs

Re: [perl #130787] [BUG] Array subsignatures confused by pair elements

2017-02-18 Thread Lloyd Fournier
I don't think this isn't a bug. This is just how signature binding works: my ($a,$b,$c) := [10,20,v => 30] Too few positionals passed; expected 3 arguments but got 2 in block at -e line 1 It makes sense to me because otherwise what would this mean? sub s(@($a,$b,:$c)) { } Pair elements

Re: need {} help

2017-02-18 Thread ToddAndMargo
On 02/18/2017 04:47 PM, Timo Paulssen wrote: / doesn't have a meaning in regex, but it's not an alpha character, so if you want to "match literally" it "must be quoted" as the first error message tells you. On top of that, balanced characters like () and {} aren't allowed for the s/// form

Re: need {} help

2017-02-18 Thread Timo Paulssen
/ doesn't have a meaning in regex, but it's not an alpha character, so if you want to "match literally" it "must be quoted" as the first error message tells you. On top of that, balanced characters like () and {} aren't allowed for the s/// form (only for the assignment form which looks like s{

need {} help

2017-02-18 Thread ToddAndMargo
Hi All, I need to figure out how to use {} is substitutes. I got the // down, now I need to learn {}. I am trying to get away from the \/\/\\/\/\/\\/ nightmare. #!/usr/bin/perl6 print "FILE = <$?FILE>\n"; (my $IAm =~ $?FILE ) ~~ s/.*\///; print "IAm = <$IAm>\n"; (my $IAm2 =~ $?FILE )

[perl #130812] [LTA] error message when trying to use ? on ~ in a regex (/ ‘[’ ~? ‘]’ . /)

2017-02-18 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #130812] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130812 > Code: ‘[a]’ ~~ / ‘[’ ~? ‘]’ . / Result: ===SORRY!=== Cannot find

Re: cifs control

2017-02-18 Thread ToddAndMargo
On 02/18/2017 06:16 AM, yary wrote: If your code will be running on Windows, then you should be able to use Perl6's native filesystem calls with UNC paths, and those can take IP addresses instead of host names eg. \\192.168.1.154\C$\Users\MiniMe\Documents Cool. Thank you! --

Re: net::SMTP in rpm land?

2017-02-18 Thread ToddAndMargo
On 02/18/2017 03:51 AM, Timo Paulssen wrote: Almost no linux distros package perl6 modules for their native package manager yet. The only distro i know of that has any kind of perl6 module packaging at all is archlinux: https://aur.archlinux.org/packages/?O=0=perl6 You need to use panda

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 --

Announce: Rakudo Perl 6 compiler, Release #108 (2017.02)

2017-02-18 Thread zoffix
# Announce: Rakudo Perl 6 compiler, Release #108 (2017.02) On behalf of the Rakudo development team, I’m very happy to announce the February 2017 release of Rakudo Perl 6 #108. Rakudo is an implementation of Perl 6 on the Moar Virtual Machine[^1]. This release implements the 6.c version of the

Re: cifs control

2017-02-18 Thread yary
If your code will be running on Windows, then you should be able to use Perl6's native filesystem calls with UNC paths, and those can take IP addresses instead of host names eg. \\192.168.1.154\C$\Users\MiniMe\Documents

Re: net::SMTP in rpm land?

2017-02-18 Thread Timo Paulssen
Almost no linux distros package perl6 modules for their native package manager yet. The only distro i know of that has any kind of perl6 module packaging at all is archlinux: https://aur.archlinux.org/packages/?O=0=perl6 You need to use panda or zef to install perl6 modules until something

Re: intercept STDERR

2017-02-18 Thread Timo Paulssen
Normally it's enough to override $*ERR for this purpose. I suggest using IO::MiddleMan to do that, or maybe IO::Capture::Simple. HTH - Timo

Re: cifs control

2017-02-18 Thread Timo Paulssen
On 18/02/17 06:04, ToddAndMargo wrote: > Hi All, > > Sorry for the 1000 questions today, but I have anb entire > week to think them up. And I have another one. > > In Windows, I am noticing that Cobian Backup and Windows > Explorer (not Internet Explorer) can tool around CIFS > (Windows) shares

Re: reverse of .lines?

2017-02-18 Thread Timo Paulssen
On 18/02/17 06:09, ToddAndMargo wrote: > On 02/17/2017 07:44 PM, yary wrote: >> Oh, then chain join on the end: >> >> my $StringReversedLines = >> $StringFullOfLineFeeds.lines.reverse.join("\n") >> >> or >> >> my $StringReversedLines = >> $StringFullOfLineFeeds.split("\n",:v).reverse.join >>

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).