in reply to Will my code work in Perl 6?
Perl 5
while <STDIN> { ...
In Perl 5, the parens are not optional. And please use a monospaced font for code :).
dot/underscore
String Concatenation from . to _. Note: whitespace is neccessary.
Only if there's a \w character next to it. $foo{bar}_$foo{bar} will be possible, but $foo_$bar will not (or at least not DWIM).
'for' is now a shortcut for 'foreach'.
I don't know if shortcut is the right word, but currently, for and foreach are exactly the same. That is, foreach (EXPR;EXPR;EXPR) and for (LIST) work.
2;0 juerd@ouranos:~$ perl -e'undef christmas'
Segmentation fault
2;139 juerd@ouranos:~$
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Will my code work in Perl 6?
by $code or die (Deacon) on Feb 08, 2002 at 19:39 UTC | |
by Juerd (Abbot) on Feb 08, 2002 at 20:35 UTC | |
by $code or die (Deacon) on Feb 08, 2002 at 21:51 UTC |
In Section
Meditations