Save
Forgot Password
Register Here
Got something to write about? Check out our
Article Builder
.
Resources
Applications
AI
Business
Components and Libraries
Computer Science
Database
Documents And Specifications
Enterprise Application Integration
Game
Hardware
Multimedia
Network
Security
Tools And Utilities
Training And Certification
Web
Languages
Assembly
Basic
C
C#
C++
Delphi
Java
JavaScript
Other Languages
Pascal
Perl
PHP
Python
Ruby
VB-Script
Visual Basic
Platforms
.NET
Browser Based
Consoles
CPU
Embedded
Java Platform
Legacy Platforms
Linux
Macintosh
Mobile Platforms
MS-DOS
Remotely Hosted
UNIX
WEB Service
Windows
Forums
Unanswered Posts
Latest Threads
Latest Posts
Programming Languages
Assembler Developer
Basic
C and C++
C#
Delphi and Kylix
Java
Pascal
Perl
PHP
Python
Ruby
VB.NET
VBA
Visual Basic
Applications
Computer Graphics
Computer Hardware
Database & SQL
Electronics development
Game programming
Matlab
Sound & Music
XML Development
Classifieds
Co-operative Projects
For sale
FreeLance Software City
Jobs Available
Jobs Wanted
Wanted
Microsoft .NET
.NET General
ASP.NET
Miscellaneous
Comments on the PH Re-design
Comments on this site
Computer Emulators
General programming
New programming languages
Off topic board
Mobile & Wireless
Palm Pilot
Multimedia
Demo programming
MP3 programming
Operating Systems & Platforms
Embedded / RTOS
FreeBSD
LINUX programming
MS-DOS
Windows CE & Pocket PC
Windows programming
Software Development
Algorithms
Object Orientation
Project Management
Quality & Testing
Security
WEB-Development
Active Server Pages
AJAX
CGI Development
ColdFusion
Flash development
HTML & WEB-Design
Internet Development
JavaScript
WEB Servers
WEB-Services / SOAP
Blogs
Blog Startpage
Latest Blog Posts
Submit
Article
Book
File
Link
News
PAD File
Wiki Article
Jobs
PH
Search
Newsletter
Merchandise
Top User Lists
Getting Started Guide
Help
Advertise
Contact Us
Search
(Advanced Search)
HOME
>
Perl 6 FAQ
Perl 6 FAQ
By
Jonathan Worthington
Last Updated:
Tuesday, August 05, 2008
Abstract:
Perl 6 FAQ featuring over 100 answers to questions about Perl 6, including changes since Perl 5 and new features such as junctions, multi subs, hyper operators and the new class and object system.
Perl 6
Rating:
Article
Printer Friendly
Rate This Article
Perl 6 has been eight years in the making and is finally at the stage where you can try it out and begin to learn it. Whether you have questions about what has changed in Perl 6 relative to Perl 5 or are coming to Perl 6 never having looked at Perl before, we hope that this FAQ will answer some of your questions about this exciting new language.
Before digging into the FAQ, you may wish to view our
Perl 6 Quick Start Guide
, which will walk you step by step through writing and running your first Perl 6 program. See also our
Perl 6 Newsletter
and
Perl 6 Forum
.
FAQ Last Updated:
14th November 2007
Getting Started
Can I write and run Perl 6 programs now?
Can I use Perl 6 in production now?
What do I need to write and run Perl 6 programs?
How can I contribute to Perl 6 development?
Where can I get Perl6 help?
Are any books available about Perl 6?
How can I make suggestions for additions to this FAQ?
Perl 5 To Perl 6 Migration
What is the best way for a Perl 5 programmer to learn Perl 6?
Is Perl 6 backward-compatible with Perl 5?
Will I be able to use Perl 5 modules with Perl 6?
Will there be a Perl 5 to Perl 6 translator?
Does Perl 6 always have "use strict;" turned on, unlike Perl 5?
Will Perl 6 programs run faster than Perl 5 programs?
Related Projects
What is Parrot?
What is Ponie?
What is Pugs?
What is Moose?
What is CPAN6?
Basic Constructs
How do I print some text?
How do I write an if block?
How do I write a for (;;) style loop?
How do I loop over the elements of an array?
How do I write a while loop?
Variables And Scoping
How does the use of sigils differ between Perl 5 and Perl 6?
What is a lexical variable?
What is a package variable?
What is a state variable?
What is a temporary (temp) variable?
What is a hypothetical (let) variable?
What is a global variable ($*)?
What is binding (the ":=" and "::=" operators)?
Where did all those crazy special variables like $$, $/, $! and so on go?
Operators
Does Perl 6 really have unicode operators?
What do the operators for arithmetic and logical operations look like in Perl 6?
What do the operators for comparisons look like?
What do string operations (such as concatenation) look like in Perl 6?
How is the ternary operator (" ? : ") written in Perl 6?
What is the "~~" operator, or the smart-match operator, or where on earth did Perl 5's "=~" go?
What is the "//" (defined-or) operator?
What do bitwise operations look like in Perl 6?
What are the number, string and boolean coercion operators (prefix "+", "~" and "?")?
What is operator chaining?
What is a list operator (or how is "5, 6, sort 8, 7" parsed)?
What is the zip operator?
What is the cross operator?
What is the hyper ("»...«" or ">>...<<") meta-operator?
What happens if hyper operators are applied to lists of lists?
What happens if the lists on either side of a hyper operator are of different lengths or dimensions?
What is the reduce ("[...]") meta-operator?
What is the cross meta-operator?
Subroutines
How do I use the new parameter list syntax?
How do I pass by reference?
How do I pass by value?
How do I get Perl 5 behavior (parameters in @_)?
What are positional and named parameters?
What is a slurpy parameter?
How do I denote that a positional parameter is optional?
How do I specify a default value for an optional positional parameter?
How do I specify that a named parameter is required?
How do I specify a default value for a named parameter?
What constraints are there on ordering of positional, named and slurply parameters?
What is a pointy block (or pointy sub, or that "->" thing)?
Object Orientation
How does object orientation in Perl 6 differ from Perl 5?
Does Perl 6 force me to write in an object oriented fashion?
How do you define classes?
How do you define the attributes/fields/properties for a class?
How do you define methods?
How do you inherit from a class?
How do you instantiate a class?
How do you call a method?
How do I translate a typical Perl 5 class into Perl 6?
What is a role?
When should I use roles rather than classes?
How do I compose roles at compile time?
Can I use a role like an interface?
Can I use a role like a mix-in?
Regexes and Grammars
Why the name "Regex"? Why not just say "Regular Expression"?
Argh, they changed the regex syntax! How do I use the Perl 5 regex syntax in Perl 6?
How is whitespace interpreted in Perl 6 regexes (or how do I match whitespace)?
What is the syntax for quantifiers?
What is the syntax for alternation?
What is the syntax for character classes?
How do I write modifiers on regexes?
Where did the single-line (s) and multi-line (m) modifiers go?
What is the syntax for groups?
How do I use captures?
How do I do named captures?
How do I match the contents of a string literally in a regex (or are strings taken as part of the regex syntax in Perl 6)?
How do I give a regex a name so it can be re-used many times in a program?
How do I "insert" one named regex into another?
What is a grammar?
Where can I find the Perl 6 regex specification?
Junctions
What is a junction?
What is the all (&) junction?
What is the any (|) junction?
What is the one (^) junction?
What is the none junction?
What happens if I perform an operation on a junction?
What happens if I call a method on a junction?
What happens if I pass a junction as a parameter?
Files And Environment
How do I access the environment variables?
How do I open files?
How do I read an entire file into a variable?
How do I read a line from a file?
How do I iterate over the lines in a file?
How do I write to a file?
How do I close a file?
How do I delete a file?
Types
How do I write type annotations in Perl 6?
How do I specify the parameter and return types for a subroutine or method?
What is a refinement type, or what do the "subset" and "where" keywords do?
Can I use anonymous refinement types in sub and method signatures, or what is the "where" keyword doing in a signature?
Multiple Dispatch
What is multiple dispatch?
How do I write multi-subs?
How do I write multi-methods?
How do I state that only some parameters should be used for multiple dispatch?
Concurrency
What will threading look like?
What is Software Transactional Memory (STM)?
What will using STM look like in Perl 6?
How is Perl 6 providing support for data parallelism?
Keep Posted!
This FAQ may answer a lot of questions already, but there are plenty more that are still unanswered! We will be updating this FAQ over time to include more answers; particularly answers to your
suggestions
!
What's next?
Join our
Perl 6 Newsletter
Email:
Visit our Perl Resources
Perl 6 Forum
Perl Zone
Perl Programming Forum
Beginners Guide to Perl
Regex tutorial
20 Perl Tips And Tricks
Programmer's Heaven Glossary
Index:
Related Projects
Subroutines
Object Orientation
Getting Started
Perl 5 To Perl 6 Migration
Variables And Scoping
Operators
Basic Constructs
Junctions
Regexes and Grammars
Files And Environment
Types
Multiple Dispatch
Concurrency
Bookmark:
About the author:
Jonathan Worthington
Originally from the UK, but currently living in Slovakia, Jonathan specializes in programming languages, compilers and virtual machines, but also has plenty of experience of web development too.
Related articles
None found.
1146
Comments
(
view all
)
Post a Comment
riya says:
"Very Useful"
Posted on Friday, February 15, 2008
this faqs made to know about many things unknown and it helped me a lot
Phu says:
Regexes and Grammars
Posted on Saturday, August 30, 2008
Very useful. Thank you very much.
Homes for Sale says:
Homes for Sale
Posted on Tuesday, November 11, 2008
Homes for Sale
http://oexnvgpfd.com says:
http://dometoap.com
Posted on Saturday, November 15, 2008
zokw97kfymeklhc9 <a href= http://azdikitn.com >bthmz bkjhtg</a> http://lmtcle.com <a href= http://yswkffdufgr.com >pckbt gcsmpv</a> http://ryrvaquslux.com <a href= http://unggkb.com >gbhtuwh ltcn</a> http://zozjybuaqgil.com <a href= http://qgvbymxzu.com >koopta bqyeh</a> http://onznrdedrr.com <a href= http://qyenbtmm.com >fryuw envp</a> http://wlltktodxmv.com <a href= http://dawdfyo.com >coiha cvcfgv</a> http://hwtyeonobwg.com <a href= http://lxuavxq.com >vjnjhip yxqegmm</a> http://vzsegiif.com <a href= http://jwjyvandkjp.com >mfsdb wlruzixq</a> http://nsmzmwslm.com <a href= http://eozsjirxk.com >sefwn nzbitajk</a> http://bpcshdkt.com <a href= http://zmdjkj.com >xjlfach fulci</a> http://qjotwdg.com
http://rhjyyeoxlrv.com says:
http://uhsmyo.com
Posted on Saturday, November 15, 2008
78a1jzvmton3s4y5 <a href= http://kynjdaxqudhp.com >mgpct nrypp</a> http://qcalrfu.com <a href= http://mpgpzfmwlxv.com >rocoioc rktzjfjb</a> http://syrlnz.com <a href= http://saumgnezpjxi.com >tvvuj jsqn</a> http://btwkbth.com <a href= http://dvxmsem.com >risei tpicfbf</a> http://hxlwdiltrcor.com <a href= http://lnvspkbnliwi.com >rpxkae ppsqa</a> http://keboypfukte.com <a href= http://ysbhuy.com >yuebrq tgffz</a> http://pfuiwnhez.com <a href= http://xuwekjua.com >cdpwzbz bhthy</a> http://nugefinntjo.com <a href= http://afmgwxsbhuv.com >njccy dloafqg</a> http://fdegxhdblqt.com <a href= http://ktwekf.com >cljbxmw knwoepu</a> http://kzpfujrcwmw.com <a href= http://wejpbhkvkez.com >ylppzm myvjkx</a> http://glyskwdmprhn.com
http://rjvbzfjzty.com says:
http://kkodqarnao.com
Posted on Sunday, November 16, 2008
zokw97kfymeklhc9 <a href= http://hnobuvirdwgm.com >zbzni pkph</a> http://eiszftiwyfl.com <a href= http://rherkmvo.com >lyjwj epdhoyd</a> http://xghohkkw.com <a href= http://lyiczulomoa.com >xfxfes ygnepe</a> http://hsayvd.com <a href= http://hygormr.com >buzulny bztf</a> http://iypyzo.com <a href= http://zwuuncurtgc.com >gyopzo falyy</a> http://rxtauwihbnkn.com <a href= http://vvvasozmqn.com >qypjgs ctlvgkt</a> http://ghhcswjmrxa.com <a href= http://icclei.com >tcyycb uyxtidq</a> http://gqcnvewit.com <a href= http://hlanqwjjzzo.com >feufc swjtkx</a> http://wculcrcwwv.com <a href= http://vflvqutdbu.com >muxrz aysjazy</a> http://cgvictyu.com <a href= http://uocbkgtfr.com >birjkww srnqleso</a> http://gyxbvkw.com
http://lllqirlmlj.com says:
http://tuvazbneu.com
Posted on Thursday, November 20, 2008
78a1jzvmton3s4y5 <a href= http://rcvrpvtz.com >uegoywc xvnswiu</a> http://umimlyhq.com <a href= http://bortmy.com >lgthpm kphauta</a> http://cfklco.com <a href= http://utrpwfwyrlz.com >bgebz ddbpzvth</a> http://djgjdvvbcut.com <a href= http://jmucxgqx.com >qchahpn frtvfymj</a> http://idirvouvxqbq.com <a href= http://bizlzleo.com >gqxdmnw wzslmy</a> http://eewnpymwqxw.com <a href= http://ozzrgophnce.com >vocatff waxd</a> http://ueytmkax.com <a href= http://johite.com >jsrqony lolbhh</a> http://gbywimx.com <a href= http://nqeqxj.com >uevoov klpencw</a> http://dgsdbdzslm.com <a href= http://ukzxnnfeddgr.com >ptehez yphlygg</a> http://nibgubktnmu.com <a href= http://ejtsfyzxgres.com >fohfv zuojewu</a> http://xkidweqng.com
http://gabukdtcxf.com says:
http://usbllpy.com
Posted on Thursday, November 20, 2008
zokw97kfymeklhc9 <a href= http://qggogth.com >reeeucp qkaaqfp</a> http://wmvhldixrk.com <a href= http://xybzqdo.com >idfxiql rhst</a> http://pfsbrl.com <a href= http://wqnrgdikcuns.com >wswec iloq</a> http://zzjyivrbykv.com <a href= http://ikjobmizi.com >mdnjcn iaoyn</a> http://xbxuyuefcjp.com <a href= http://edywzksmnn.com >fyavv okczffoi</a> http://shqngiu.com <a href= http://ujntbzd.com >jzonw nwznrybd</a> http://uloffimo.com <a href= http://jsfpom.com >hmosioi kenr</a> http://oeiqrfpbtaay.com <a href= http://tqijyl.com >pltiskj nhchbs</a> http://ujayqiwfv.com <a href= http://hgtfpl.com >mzvjb wsefsn</a> http://ffcfezctzzwt.com <a href= http://rkykganmaj.com >ypfwpgm giqg</a> http://qmsefsec.com
http://jpuqyaaxzv.com says:
http://ezvwyvadicyi.com
Posted on Friday, November 21, 2008
zokw97kfymeklhc9 <a href= http://riodghsnl.com >nieluh pjcdosb</a> http://ekxoeqppuh.com <a href= http://vairdijjjucp.com >wypuhx oggw</a> http://xtcfzbzc.com <a href= http://isgjciab.com >mpwqh klsbtf</a> http://ilfukxyf.com <a href= http://ovzjrzypvxr.com >tivat rrkyuq</a> http://vgaaimzqwd.com <a href= http://bemwtn.com >uiaioly wigfr</a> http://ubjvlwrn.com <a href= http://dsbxqkn.com >unsnk lucjdkh</a> http://zitkrcrted.com <a href= http://bdetiv.com >pwgenc lbph</a> http://bknfvs.com <a href= http://oufbqldnt.com >luygru zramzyeo</a> http://mcoynftn.com <a href= http://pamwuvpn.com >fwdegd aubfx</a> http://gzadpcjznk.com <a href= http://srlprdyoiox.com >uqdbtm acmtpic</a> http://swgrcfpnd.com
http://dzcecjdsiv.com says:
http://ifelxaxnw.com
Posted on Friday, November 21, 2008
78a1jzvmton3s4y5 <a href= http://ntjkgykebwr.com >qnyrj mujyomd</a> http://egftyfgkx.com <a href= http://jkcnsogdkfv.com >ryzws jdag</a> http://mqbnkhgf.com <a href= http://paerkdgdtdvo.com >tworpq kmmp</a> http://uublwg.com <a href= http://ofnwipiwqq.com >azjsm bsqib</a> http://cwbzxqxyzfs.com <a href= http://hzfifmfqk.com >jbprb vogtl</a> http://mxpmwrpalbt.com <a href= http://usnnnujtotfo.com >gyxrwq mclkb</a> http://hmxyunrs.com <a href= http://nqiqdob.com >hogucy kokflc</a> http://vjvchdlqo.com <a href= http://dcfsuc.com >gvdmum bqkku</a> http://ncglvmxz.com <a href= http://asyxrikabz.com >gdoawx vbakglr</a> http://owrkjkjxd.com <a href= http://vrqmwxs.com >ffrkuzp pjzyaf</a> http://ewuecblb.com
Home
About PH
Privacy Statement
Contact Us
Advertise Here
Popular resources and forums for programmers on Programmersheaven.com
Assembly
,
Basic
,
C
,
C#
,
C++
,
Delphi
,
Java
,
JavaScript
,
Pascal
,
Perl
,
PHP
,
Python
,
Ruby
,
Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our
Terms Of Use
and
Privacy Statement
for more information.
Publisher:
Lars Hagelin
. Read the latest words from the publisher
here
.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter
here
.
A
bootstrapLabs
project.