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

Bugs or PEBKAC?

Thread Next
From:
Parrot Raiser
Date:
July 11, 2011 08:16
Subject:
Bugs or PEBKAC?
Message ID:
CACwLAp9Ud2BXPGRWbi8d4iZfjJBrN7SjY3MpBL-w9XbY3PtvuQ@mail.gmail.com
I'm trying to write a small program in Perl 6, to generate an
executable framework from a heredoc. (There are other ways of
achieving the same effect, but it's an exercise.)

Problem #1. Trying to specify the heredoc in exactly the manner
specified by the synopsis does not work.

The code, (cut-and-pasted from the sysnopsis), and error message are
illustrated below:

$ cat colon
#! /home/guru/bin/perl6

my $amount = "\$100";
my $curtain = 3;

    print qq:to/END/;
        Give $amount to the man behind curtain number $curtain.
        END
$ ./colon
===SORRY!===
Colons may not be used to delimit quoting constructs at line 6, near
":to/END/;\n"

Problem #2. Setting the permissions on the new file.

Chmod or an equivalent, (e.g. system) doesn't appear to be in the
synopses or the language. Is there somewhere else I should be looking?

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