mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-06 14:58:31 +00:00
Merge pull request #375 from xakon/master
[perl/en] Fix some links at Perl tutorial
This commit is contained in:
commit
dac3063ddf
@ -94,12 +94,12 @@ python2 hello.py 2> "error.err"
|
|||||||
# The output error will overwrite the file if it exists, if you want to
|
# The output error will overwrite the file if it exists, if you want to
|
||||||
# concatenate them, use ">>" instead.
|
# concatenate them, use ">>" instead.
|
||||||
|
|
||||||
# Commands can be substitued within other commands using $( ):
|
# Commands can be substituted within other commands using $( ):
|
||||||
# The following command displays the number of files and directories in the
|
# The following command displays the number of files and directories in the
|
||||||
# current directory.
|
# current directory.
|
||||||
echo "There are $(ls | wc -l) items here."
|
echo "There are $(ls | wc -l) items here."
|
||||||
|
|
||||||
# Bash uses a case statement that works similarily to switch in Java and C++:
|
# Bash uses a case statement that works similarly to switch in Java and C++:
|
||||||
case "$VARIABLE" in
|
case "$VARIABLE" in
|
||||||
#List patterns for the conditions you want to meet
|
#List patterns for the conditions you want to meet
|
||||||
0) echo "There is a zero.";;
|
0) echo "There is a zero.";;
|
||||||
|
@ -377,7 +377,7 @@ nil ; for false - and the empty list
|
|||||||
;; 4. Equality
|
;; 4. Equality
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
;; Common Lisp has a sophisticated equality system. A couple are covered yere.
|
;; Common Lisp has a sophisticated equality system. A couple are covered here.
|
||||||
|
|
||||||
;; for numbers use `='
|
;; for numbers use `='
|
||||||
(= 3 3.0) ; => t
|
(= 3 3.0) ; => t
|
||||||
|
@ -250,7 +250,7 @@ public class LearnJava {
|
|||||||
// Conditional Shorthand
|
// Conditional Shorthand
|
||||||
// You can use the '?' operator for quick assignments or logic forks.
|
// You can use the '?' operator for quick assignments or logic forks.
|
||||||
// Reads as "If (statement) is true, use <first value>, otherwise, use <second value>"
|
// Reads as "If (statement) is true, use <first value>, otherwise, use <second value>"
|
||||||
int foo = 5
|
int foo = 5;
|
||||||
String bar = (foo < 10) ? "A" : "B";
|
String bar = (foo < 10) ? "A" : "B";
|
||||||
System.out.println(bar); // Prints A, because the statement is true
|
System.out.println(bar); // Prints A, because the statement is true
|
||||||
|
|
||||||
|
@ -131,8 +131,6 @@ sub logger {
|
|||||||
# Now we can use the subroutine just as any other built-in function:
|
# Now we can use the subroutine just as any other built-in function:
|
||||||
|
|
||||||
logger("We have a logger subroutine!");
|
logger("We have a logger subroutine!");
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Using Perl modules
|
#### Using Perl modules
|
||||||
|
Loading…
Reference in New Issue
Block a user