Equivalents in Perl and Octave
In the following, p
is Perl and o
is the equivalent Octave.
p: != o: ~= p: == o: == p: ** o: ^ pe: 2**3 o: 2^3 p: &&, and o: && p: xor o: xor p: $x xor $y o: xor (x, y) p: sprintf o: sprintf pe: @A = ([1, 2], [3, 4], [5, 6]); oe: A = [1 2; 3 4; 5 6] pe: @v = (1..2); oe: v = 1:2; p: scalar o: size p: Getcwd::cwd o: pwd p: chdir o: cd p: none o: load p: none o: whos p: none o: who p: delete o: clear pe: @x = @y[0..9]; oe: x = y(1:10); p: $! o: lasterror () p: eval {}; o: try/catch p: say/print o: disp (); %%note: o{disp} only takes one argument. %% p: grep o: find
Copyright © Ben Bullock 2009-2024. All
rights reserved.
For comments, questions, and corrections, please email
Ben Bullock
(benkasminbullock@gmail.com) or use the discussion group at Google Groups.
/
Privacy /
Disclaimer