user_guide:tutorials:perl_intro

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
user_guide:perl_intro [2019/01/29 21:46] – external edit 127.0.0.1user_guide:perl_intro [2019/02/07 14:17] – repaired $ sign fail oroehrig
Line 4: Line 4:
  
 ====Standard data structures==== ====Standard data structures====
-The Perl programming language originally provides three different data structures, scalars($), arrays(@), and hashes(%). The user always has to specify the type of a variable using the appropriate symbol ''$'', ''@'', or ''%''. If you forget to do so, you will receive the following error message:+The Perl programming language originally provides three different data structures, scalars(''$''), arrays(''@''), and hashes(''%''). The user always has to specify the type of a variable using the appropriate symbol ''$'', ''@'', or ''%''. If you forget to do so, you will receive the following error message:
 <code> <code>
- polytope > i=5;+> i=5;
 polymake:  ERROR: Unquoted string "i" may clash with future reserved word. polymake:  ERROR: Unquoted string "i" may clash with future reserved word.
 </code>\\ </code>\\
Line 37: Line 37:
 </code> </code>
 ====''polymake''-Perl==== ====''polymake''-Perl====
-In addition to the three standard data structures, the enriched version of ''Perl'' used in ''polymake'' also provides special data structures for dealing with more complicated structures. ''polymake'''s object hierarchy is completely reflected on the Perl side. Let us create a small polytope as an example object.+In addition to the three standard data structures, the enriched version of ''Perl'' used in ''polymake'' also provides special data structures for dealing with more complicated conceptsFor an introduction to the polymake object model see [[.properties#objects|here]]. 
 + 
 +''polymake'''s object hierarchy is completely reflected on the Perl side. Let us create a small polytope as an example object.
 <code> <code>
 > $p = new Polytope(POINTS=>[[1,0,1],[1,0,-1],[1,1,0],[1,-1,0]]); > $p = new Polytope(POINTS=>[[1,0,1],[1,0,-1],[1,1,0],[1,-1,0]]);
Line 191: Line 193:
  
 ====Writing scripts==== ====Writing scripts====
-Comprehensive information on how to use scripts within ''polymake'' can be found [[scripting:start|here]].+Comprehensive information on how to use scripts within ''polymake'' can be found [[.howto:scripting|here]].
  • user_guide/tutorials/perl_intro.txt
  • Last modified: 2019/02/11 16:21
  • by oroehrig