Site Tools


perl:basic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
perl:basic [2015/06/10 11:29] lunetikkperl:basic [2017/11/29 17:06] lunetikk
Line 1: Line 1:
-====== AutoIt Basic ======+====== Perl Basic ======
  
 ^  Code  ^  What it does  ^ ^  Code  ^  What it does  ^
Line 14: Line 14:
 |  pop …  |  Remove at the end  |   |  pop …  |  Remove at the end  |  
 |  shift …  |  Remove at the beginning  |   |  shift …  |  Remove at the beginning  |  
-|  <code>foreach $arrayelement (@array) {+|  <code perl>foreach $arrayelement (@array) {
     print $arrayelement;     print $arrayelement;
 }</code>  |  Output of all arrayelements   |   }</code>  |  Output of all arrayelements   |  
-|  <code>if ($nr2 < 1000) {+|  <code perl>if ($nr2 < 1000) {
     print "nr 2 is smaller than 1000";     print "nr 2 is smaller than 1000";
 } }
Line 23: Line 23:
     print "nr 2 is bigger than 1000";     print "nr 2 is bigger than 1000";
 }</code>  |  Example if-else  | }</code>  |  Example if-else  |
-|  <code>while ($count != $result) {+|  <code perl>while ($count != $result) {
     print $count;     print $count;
     print "\n";     print "\n";
     $count++;     $count++;
 }</code>  |  While - until  |   }</code>  |  While - until  |  
 +
 +\\
 +\\
 +~~DISCUSSION~~
  
perl/basic.txt · Last modified: 2018/12/20 17:45 by lunetikk