home | blog

Introduction to Perl 6 screencast - part 1 - scalars

Published on 2010.07.19 at 17:07:33 Bookmark and Share

Tags: Perl 6, Perl, screencast, scalars, Rakudo


Direct link to the Perl 6 scalars screencast

Rakudo

IRC: #perl6 on irc.freenode.net

Perl 6 Code examples

  use v6;
  say "Hello world";


  use v6;
  my $name = prompt "Please type in your name: ";
  say "Hello $name, how are you?";


  use v6;
  my $year = prompt "When were you born? ";
  if $year > 1987 {
    say "You are younger than Perl by { $year - 1987 } years";
  }


  use v6;
  my $year = prompt "When were you born? ";
  if 1995 > $year > 1987 {
    say "You are younger than Perl 1 but older than Perl 5";
  }



  use v6;
  my $luck = prompt "What is your lucky number? ";
  if $luck == 3 or $luck == 7 or $luck == 13 {
    say "Oh, that's like mine";
  }

  if $luck == 3|7|13 {
    say "Oh, that's still like mine";
  }


blog comments powered by Disqus
Follow szabgab on Twitter
Tags
Perl (270)
Perl 5 (94)
Padre (79)
Perl 6 (42)
IDE (41)
testing (38)
CPAN (28)
business (27)
newsletter (24)
marketing (23)
training (20)
TPF (17)
open source (17)
Windows (17)
promotion (17)
Parrot (16)
YAPC (16)
Israel (15)
grants (15)
Python (14)