if you can:
$s ~~ "foo"
$s ~~ /foo/
then wouldn't be good to have also:
$s.contains("foo");
$s.contains(/foo/);
IOW, overload .contains() with Str and Regex
F
On 06/12/2017 10:42 AM, Elizabeth Mattijsen wrote:
On 12 Jun 2017, at 01:27, ToddAndMargo wrote:
perl6 -e 'my $x = "\t"; if $x !~
On 22. mars 2017 06:59, ToddAndMargo wrote:
So, unless I specifically declare a variable as a
particular type, I can change its "type" on the fly.
you don't change the type of a variable. instead you use a type which is
"broader" and accept any object type.
e.g.: you can assign 123 to an I
On 20. mars 2017 15:54, Patrick R. Michaud wrote:
On Mon, Mar 20, 2017 at 02:36:49PM +0100, Francesco Rivetti wrote:
On 18. mars 2017 11:54, Elizabeth Mattijsen wrote:
if (my $x = frobnicate(42)) {
say $x
}
[...]
if frobnicate(42) -> $x {
say $x
}
which is way more elegant. Sho
On 18. mars 2017 11:54, Elizabeth Mattijsen wrote:
In Perl 5 many people use the syntax to assign the value of a complicated
expression to be useable inside the if statement:
if (my $x = frobnicate(42)) {
say $x
}
which is very handy and used many times, I completely agree.
But as you
On 2017-02-10 5:51 AM, Brandon Allbery wrote:
|3) not finding how to attach a file |
Strictly speaking, that is not an SMTP function. You would use a MIME
module to generate $message with an attached file. (This would likely be
an example of $message not being a Str; it would be some kind of