Exercise: login to cowboy.cns.uni.edu and try the which perl command to see what the output is.
chmod 755 myFile.txt ls -l myFile.txt -rwxr-xr-x myFile.txt chmod 644 myFile.txt ls -l myFile.txt -rw-r--r-- myFile.txt In octal (base 8) and in binary (base 2) we have Octal Binary ls -l 0 000 --- 1 001 --x 2 010 -w- 3 011 -wx 4 100 r-- 5 101 r-x 6 110 rw- 7 111 rwx --- --- --- rwx 421 As stated on page 292 of Elizabeth Castro book, you assign a value of 4 for read permission, 2 for write permission, and 1 for execute permission. Saying chmod 755 fileName.txt means you are giving all permissions to yourself (the owner of fileName.txt), since 7 = 4 + 2 + 1 = 111 in binary. You are giving read and execute permissions to your group and everyone else (others), because 4 = read and 1 = execute, and 4 + 1 = 5 and 5 = 101 in binary, or r-x 101
Here is the statement we looked at in randomGenX.cgi PERL script: $quoteList =~ tr/ //d; The user could type in 1, 5 - 7 , 9 and it would be transliterated to 1,5-7,9 by the $quoteList =~ tr/ //d; statement. The d stands for delete. --------------------------------------------------------------------- What would the following PERL statements do? print "Please enter data to be processed by the transliteration " . "function: \n\n"; $someData = <>; print "\nYou entered: $someData"; $someData =~ tr/a-z/b-za/; print "\n It is now: $someData\n\n";
Please enter data to be processed by the transliteration function: UNI Panthers rock and roll, especially volleyball! Feb 19th, 2003 You entered: UNI Panthers rock and roll, especially volleyball! Feb 19th, 2003 It is now: UNI Pbouifst spdl boe spmm, ftqfdjbmmz wpmmfzcbmm! Ffc 19ui, 2003
use CGI qw(:standard); $quoteList = param('quoteNumbers');