Course Home
Text
Syllabus
Schedule
Grades
Lab/Homeworks
Suggested Reading
 

COMP 2400 Software Tools

Goals: 

  • Understand Perl regular expressions & file handling
    • Write templates to match a pattern
    • Retrieve matched portions
    • Special variables $_, $1, ...,$9, $`, $&, and $' (remembering patterns)
    • Exercise (cont.) Download all .pdf & .tar.gz extension files from a popular Perl book webpage

      -- get the index.html page by issuing a wget command
      -- parse it for the URLs
      -- write the URLs to a file
      -- issue a wget for each URL from this file

Useful commands/tips:

  • to run a command from within a Perl script, enclose it between a pair of backticks, e.g.
    `wget URL`; 

Useful Links:

Online Tutorial:

Handouts: